https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36941
Eric Gallager changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
--- Comment #6 from manu at gcc dot gnu dot org 2008-08-23 02:44 ---
extern struct S x;
void foo() { (void)x; }
void baz() { x ; }
pr36941.c: In function baz:
pr36941.c:3:1: error: expression statement has incomplete type
Where is the quote about undefined behaviour from?
--
manu
--- Comment #1 from joseph at codesourcery dot com 2008-07-25 22:29 ---
Subject: Re: New: gcc does not reject invalid cast
On Fri, 25 Jul 2008, sabre at nondot dot org wrote:
> GCC accepts:
> extern struct S x;
> void foo() { (void)x; }
What constraint do you think this violates, or
--- Comment #2 from sabre at nondot dot org 2008-07-25 22:30 ---
'If the lvalue has an incomplete type and does not have array type, the
behavior is
undefined.'
QoI
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36941
--- Comment #3 from sabre at nondot dot org 2008-07-25 22:31 ---
Though that does raise a question. Does GCC normally emit errors for undefined
behavior? I thought the policy was to insert runtime traps? If so, doesn't
the { x; } case qualify, or does it violate some other constraint?
--- Comment #4 from joseph at codesourcery dot com 2008-07-25 22:59 ---
Subject: Re: gcc does not reject invalid cast
On Fri, 25 Jul 2008, sabre at nondot dot org wrote:
> Though that does raise a question. Does GCC normally emit errors for
> undefined
> behavior? I thought the pol
--- Comment #5 from sabre at nondot dot org 2008-07-26 05:10 ---
Ok, so is it right or wrong? :)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36941
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36941
Eric Gallager changed:
What|Removed |Added
Keywords||accepts-invalid, diagnostic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36941
--- Comment #9 from Joseph S. Myers ---
Author: jsm28
Date: Wed Dec 4 23:26:10 2019
New Revision: 278976
URL: https://gcc.gnu.org/viewcvs?rev=278976&root=gcc&view=rev
Log:
Fix C handling of use of lvalues of incomplete types (PR c/36941, PR c/8
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36941
Joseph S. Myers changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36941
--- Comment #11 from Christophe Lyon ---
Author: clyon
Date: Fri Dec 6 10:54:46 2019
New Revision: 279039
URL: https://gcc.gnu.org/viewcvs?rev=279039&root=gcc&view=rev
Log:
[testsuite][aarch64] type_redef_11.c: Update expected diagnostics.
Aft
11 matches
Mail list logo