[Bug c/36941] gcc does not reject invalid cast

2017-07-24 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36941 Eric Gallager changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug c/36941] gcc does not reject invalid cast

2008-08-22 Thread manu at gcc dot gnu dot org
--- 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

[Bug c/36941] gcc does not reject invalid cast

2008-07-25 Thread joseph at codesourcery dot com
--- 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

[Bug c/36941] gcc does not reject invalid cast

2008-07-25 Thread sabre at nondot dot org
--- 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

[Bug c/36941] gcc does not reject invalid cast

2008-07-25 Thread sabre at nondot dot org
--- 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?

[Bug c/36941] gcc does not reject invalid cast

2008-07-25 Thread joseph at codesourcery dot com
--- 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

[Bug c/36941] gcc does not reject invalid cast

2008-07-25 Thread sabre at nondot dot org
--- 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

[Bug c/36941] gcc does not reject invalid cast

2018-04-25 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36941 Eric Gallager changed: What|Removed |Added Keywords||accepts-invalid, diagnostic

[Bug c/36941] gcc does not reject invalid cast

2019-12-04 Thread jsm28 at gcc dot gnu.org
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

[Bug c/36941] gcc does not reject invalid cast

2019-12-04 Thread jsm28 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36941 Joseph S. Myers changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug c/36941] gcc does not reject invalid cast

2019-12-06 Thread clyon at gcc dot gnu.org
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