Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
36262a4c
Commit
36262a4c
authored
Oct 02, 2004
by
Joseph Myers
Committed by
Joseph Myers
Oct 02, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* c-typeck.c (warn_for_assignment): Don't permit argnum == 0.
From-SVN: r88412
parent
5b022de5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
22 deletions
+7
-22
gcc/ChangeLog
+4
-0
gcc/c-typeck.c
+3
-22
No files found.
gcc/ChangeLog
View file @
36262a4c
2004
-
10
-
02
Joseph
S
.
Myers
<
jsm
@
polyomino
.
org
.
uk
>
*
c
-
typeck
.
c
(
warn_for_assignment
):
Don
't permit argnum == 0.
2004-10-01 Ulrich Weigand <uweigand@de.ibm.com>
2004-10-01 Ulrich Weigand <uweigand@de.ibm.com>
* config/s390/s390-protos.h (s390_comparison): Add prototype.
* config/s390/s390-protos.h (s390_comparison): Add prototype.
...
...
gcc/c-typeck.c
View file @
36262a4c
...
@@ -3720,8 +3720,7 @@ c_convert_parm_for_inlining (tree parm, tree value, tree fn, int argnum)
...
@@ -3720,8 +3720,7 @@ c_convert_parm_for_inlining (tree parm, tree value, tree fn, int argnum)
/* Print a warning using MSGID.
/* Print a warning using MSGID.
It gets OPNAME as its one parameter.
It gets OPNAME as its one parameter.
if OPNAME is null and ARGNUM is 0, it is replaced by "passing arg of `FUNCTION'".
If OPNAME is null, it is replaced by "passing arg ARGNUM of 'FUNCTION'".
Otherwise if OPNAME is null, it is replaced by "passing arg ARGNUM of `FUNCTION'".
FUNCTION and ARGNUM are handled specially if we are building an
FUNCTION and ARGNUM are handled specially if we are building an
Objective-C selector. */
Objective-C selector. */
...
@@ -3739,26 +3738,8 @@ warn_for_assignment (const char *msgid, const char *opname, tree function,
...
@@ -3739,26 +3738,8 @@ warn_for_assignment (const char *msgid, const char *opname, tree function,
function
=
selector
;
function
=
selector
;
argnum
-=
2
;
argnum
-=
2
;
}
}
if
(
argnum
==
0
)
gcc_assert
(
argnum
>
0
);
{
if
(
function
)
if
(
function
)
{
/* Function name is known; supply it. */
const
char
*
const
argstring
=
_
(
"passing arg of '%s'"
);
new_opname
=
(
char
*
)
alloca
(
IDENTIFIER_LENGTH
(
function
)
+
strlen
(
argstring
)
+
1
+
1
);
sprintf
(
new_opname
,
argstring
,
IDENTIFIER_POINTER
(
function
));
}
else
{
/* Function name unknown (call through ptr). */
const
char
*
const
argnofun
=
_
(
"passing arg of pointer to function"
);
new_opname
=
(
char
*
)
alloca
(
strlen
(
argnofun
)
+
1
+
1
);
sprintf
(
new_opname
,
argnofun
);
}
}
else
if
(
function
)
{
{
/* Function name is known; supply it. */
/* Function name is known; supply it. */
const
char
*
const
argstring
=
_
(
"passing arg %d of '%s'"
);
const
char
*
const
argstring
=
_
(
"passing arg %d of '%s'"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment