[Bug c/84900] Compiler report a error unexpectedly.

2018-03-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84900

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-03-21
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #4 from Marek Polacek  ---
Confirmed then.

[Bug c/84900] Compiler report a error unexpectedly.

2018-03-19 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84900

--- Comment #3 from joseph at codesourcery dot com  ---
Yes, I'd consider this invalid code.  Presumably there's some issue with 
the GNU extension allowing casts of structs to the same type, whereby in 
some cases it fails to make the result of the cast not an lvalue.

[Bug c/84900] Compiler report a error unexpectedly.

2018-03-19 Thread 141242068 at smail dot nju.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84900

--- Comment #2 from wierton <141242068 at smail dot nju.edu.cn> ---
(In reply to Richard Biener from comment #1)
> I belive the code is invalid and using literal 0 instead of test = 0
> shouldn't make it accepted either.  clang rejects both variants.

I think so too, the gcc should accept the both two forms or reject them
together, but as I tested above, the gcc accept the first and reject the
second.

[Bug c/84900] Compiler report a error unexpectedly.

2018-03-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84900

Richard Biener  changed:

   What|Removed |Added

   Keywords||accepts-invalid

--- Comment #1 from Richard Biener  ---
I belive the code is invalid and using literal 0 instead of test = 0 shouldn't
make it accepted either.  clang rejects both variants.