aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 6226203..796f1ea 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -2883,6 +2883,12 @@ shadow_tag_warned (const struct c_declspecs *declspecs, int warned)
found_tag = true;
+ if (declspecs->restrict_p)
+ {
+ error ("invalid use of %<restrict%>");
+ warned = 1;
+ }
+
if (name == 0)
{
if (warned != 1 && code != ENUMERAL_TYPE)