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
9590fa72
Commit
9590fa72
authored
Aug 11, 1996
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(finish_struct): If pedantic, also warn if struct/union has no named
members. From-SVN: r12612
parent
d3d3fba0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
gcc/c-decl.c
+11
-3
No files found.
gcc/c-decl.c
View file @
9590fa72
...
@@ -5533,9 +5533,17 @@ finish_struct (t, fieldlist, attributes)
...
@@ -5533,9 +5533,17 @@ finish_struct (t, fieldlist, attributes)
old_momentary
=
suspend_momentary
();
old_momentary
=
suspend_momentary
();
if
(
fieldlist
==
0
&&
pedantic
)
if
(
pedantic
)
pedwarn
((
TREE_CODE
(
t
)
==
UNION_TYPE
?
"union has no members"
{
:
"structure has no members"
));
for
(
x
=
fieldlist
;
x
;
x
=
TREE_CHAIN
(
x
))
if
(
DECL_NAME
(
x
)
!=
0
)
break
;
if
(
x
==
0
)
pedwarn
(
"%s has no %smembers"
,
(
TREE_CODE
(
t
)
==
UNION_TYPE
?
"union"
:
"structure"
),
(
fieldlist
?
"named "
:
""
));
}
/* Install struct as DECL_CONTEXT of each field decl.
/* Install struct as DECL_CONTEXT of each field decl.
Also process specified field sizes.
Also process specified field sizes.
...
...
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