Bug 38243 - Restrict constraint violation not an error with -pedantic-errors
Summary: Restrict constraint violation not an error with -pedantic-errors
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: unknown
: P3 normal
Target Milestone: 4.5.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 38246 (view as bug list)
Depends on:
Blocks: 16989
  Show dependency treegraph
 
Reported: 2008-11-24 03:09 UTC by Neil Booth
Modified: 2009-04-19 18:26 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work: 4.5.0
Known to fail:
Last reconfirmed: 2008-11-24 16:13:40


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Neil Booth 2008-11-24 03:09:11 UTC
The following violates constraint C99 6.7.3p2 yet is only a warning with -pedantic-errors:

restrict struct s;
Comment 1 Andreas Schwab 2008-11-24 09:06:44 UTC
*** Bug 38246 has been marked as a duplicate of this bug. ***
Comment 2 Joseph S. Myers 2009-04-19 18:25:20 UTC
Subject: Bug 38243

Author: jsm28
Date: Sun Apr 19 18:25:07 2009
New Revision: 146356

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=146356
Log:
	PR c/38243
	* c-decl.c (shadow_tag_warned): Diagnose use of restrict when
	declaring a tag.

testsuite:
	* gcc.dg/c99-restrict-3.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/c99-restrict-3.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-decl.c
    trunk/gcc/testsuite/ChangeLog

Comment 3 Joseph S. Myers 2009-04-19 18:26:36 UTC
Fixed for 4.5.