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
720283f2
Commit
720283f2
authored
Nov 12, 1996
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(grokdeclarator): Generate a warning if -Wimplicit, unless a warning
was already generated by -Wreturn-type. From-SVN: r13135
parent
2f23fcc9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
gcc/c-decl.c
+14
-4
No files found.
gcc/c-decl.c
View file @
720283f2
...
...
@@ -4277,10 +4277,20 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
if
(
type
==
0
)
{
if
(
funcdef_flag
&&
warn_return_type
&&
!
(
specbits
&
((
1
<<
(
int
)
RID_LONG
)
|
(
1
<<
(
int
)
RID_SHORT
)
|
(
1
<<
(
int
)
RID_SIGNED
)
|
(
1
<<
(
int
)
RID_UNSIGNED
))))
warn_about_return_type
=
1
;
if
(
!
(
specbits
&
((
1
<<
(
int
)
RID_LONG
)
|
(
1
<<
(
int
)
RID_SHORT
)
|
(
1
<<
(
int
)
RID_SIGNED
)
|
(
1
<<
(
int
)
RID_UNSIGNED
))))
{
/* C9x will probably require a diagnostic here.
For now, issue a warning if -Wreturn-type and this is a function,
or if -Wimplicit; prefer the former warning since it is more
explicit. */
if
((
warn_implicit
||
warn_return_type
)
&&
funcdef_flag
)
warn_about_return_type
=
1
;
else
if
(
warn_implicit
)
warning
(
"type defaults to `int' in declaration of `%s'"
,
name
);
}
defaulted_int
=
1
;
type
=
integer_type_node
;
}
...
...
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