http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359
Dara Hazeghi changed:
What|Removed |Added
Status|WAITING |RESOLVED
Resolution|---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359
--- Comment #9 from joseph at codesourcery dot com ---
I think this is invalid, because the assignment that changes the current
union member doesn't go through the union type (cf. DR#236).
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359
--- Comment #8 from Dara Hazeghi ---
Okay, here is I think a more clear example. However, from what Jakub says
above, this is probably undefined.
int printf(const char *, ...);
union
{
int i;
long long ll;
} u;
long long *pll = &u.ll;
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359
Richard Biener changed:
What|Removed |Added
Status|RESOLVED|WAITING
Last reconfirmed|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359
Jakub Jelinek changed:
What|Removed |Added
CC||jsm28 at gcc dot gnu.org
--- Comment #6 f
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359
--- Comment #5 from Dara Hazeghi ---
Sorry to ask again on this, but after re-reading, I'm not sure I understand the
type-punning argument here:
**ppll = ll; // write to u.ll
*k = 0; // write to u.i
j = *ppa; // u not touched
ia[0][0] =
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #4 f
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359
--- Comment #3 from Dara Hazeghi ---
My apologies for the invalid report and thank you for the clear explanation.
I've been using frama-c to check validity of the testcases, but clearly in this
case it's not sufficient.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359
--- Comment #2 from Jakub Jelinek ---
I think this testcase is invalid.
C/C++ just disallow type punning through unions altogether (only one union
member can be active at each point), while GCC allows it as an extension, it
requires the accesses b
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
10 matches
Mail list logo