[Bug c/63645] Incorrect code generation
terra at gnome dot org
gcc-bugzilla@gcc.gnu.org
Sat Oct 25 21:30:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63645
M Welinder <terra at gnome dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |---
--- Comment #5 from M Welinder <terra at gnome dot org> ---
You guys are trigger happy.
> Your union simply takes more space than your GnmExprBinary struct
Of course it does! The union requires space that is large enough
for its largest member, so having a smaller member is going to be
the case in 99% of unions and the standard has no objections.
If you think otherwise, a reference to the standard would be nice.
To show that the size difference is irrelevant, simply change
GnmExprBinary to
typedef struct {
guint8 oper;
int argc;
GnmFunc *func;
} GnmExprBinary;
whereupon GnmExprBinary, GnmExprFunction, and GnmExpr all take up the
same amount of space.
We still get this error from valgrind.
==6201== Conditional jump or move depends on uninitialised value(s)
==6201== at 0x4005F8: test (vvv.c:38)
==6201== by 0x4004D8: main (vvv.c:49)
More information about the Gcc-bugs
mailing list