[Bug c/52023] [C11] _Alignof (double) yields wrong value on x86
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023 Andrew Pinski changed: What|Removed |Added CC||david.merillat at gmail dot com --- Comment #19 from Andrew Pinski --- *** Bug 69560 has been marked as a duplicate of this bug. ***
[Bug c/52023] [C11] _Alignof (double) yields wrong value on x86
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #18 from Jakub Jelinek --- (void) cast it away in the Darwin macro. But that is tracked already in PR59496.
[Bug c/52023] [C11] _Alignof (double) yields wrong value on x86
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023 --- Comment #17 from Jan-Benedict Glaw --- (In reply to Marek Polacek from comment #16) > > tree field = build_decl (UNKNOWN_LOCATION, FIELD_DECL, NULL_TREE, > > ^ > > cc1plus: all warnings being treated as errors > > Should be fixed now. No, not yet. The most recent build for powerpc64-darwin done by my build robot still faces this warning and thus breaks: http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=89063 --> http://toolchain.lug-owl.de/buildbot/deliver_artifact.php?mode=view&id=733877 So what shall we do with this? The macro is called with two arguments, of which one ("field") isn't used. Just mark it as unused or (void)-cast it away?
[Bug c/52023] [C11] _Alignof (double) yields wrong value on x86
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment #16 from Marek Polacek --- (In reply to Jan-Benedict Glaw from comment #15) > Some fallout for an unused variable, see eg. > http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=50585 : > > g++ -c -DIN_GCC_FRONTEND -DIN_GCC_FRONTEND -g -O2 -DIN_GCC > -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti > -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings > -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long > -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common > -DHAVE_CONFIG_H -I. -Ic-family -I../../../gcc/gcc > -I../../../gcc/gcc/c-family -I../../../gcc/gcc/../include > -I../../../gcc/gcc/../libcpp/include -I/opt/cfarm/mpc/include > -I../../../gcc/gcc/../libdecnumber -I../../../gcc/gcc/../libdecnumber/dpd > -I../libdecnumber -I../../../gcc/gcc/../libbacktrace-o > c-family/c-common.o -MT c-family/c-common.o -MMD -MP -MF > c-family/.deps/c-common.TPo ../../../gcc/gcc/c-family/c-common.c > ../../../gcc/gcc/c-family/c-common.c: In function ‘tree_node* > c_sizeof_or_alignof_type(location_t, tree, bool, bool, int)’: > ../../../gcc/gcc/c-family/c-common.c:5007:9: error: unused variable ‘field’ > [-Werror=unused-variable] > tree field = build_decl (UNKNOWN_LOCATION, FIELD_DECL, NULL_TREE, > ^ > cc1plus: all warnings being treated as errors Should be fixed now.
[Bug c/52023] [C11] _Alignof (double) yields wrong value on x86
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023 Jan-Benedict Glaw changed: What|Removed |Added CC||jbg...@lug-owl.de --- Comment #15 from Jan-Benedict Glaw --- Some fallout for an unused variable, see eg. http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=50585 : g++ -c -DIN_GCC_FRONTEND -DIN_GCC_FRONTEND -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common -DHAVE_CONFIG_H -I. -Ic-family -I../../../gcc/gcc -I../../../gcc/gcc/c-family -I../../../gcc/gcc/../include -I../../../gcc/gcc/../libcpp/include -I/opt/cfarm/mpc/include -I../../../gcc/gcc/../libdecnumber -I../../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../../gcc/gcc/../libbacktrace-o c-family/c-common.o -MT c-family/c-common.o -MMD -MP -MF c-family/.deps/c-common.TPo ../../../gcc/gcc/c-family/c-common.c ../../../gcc/gcc/c-family/c-common.c: In function ‘tree_node* c_sizeof_or_alignof_type(location_t, tree, bool, bool, int)’: ../../../gcc/gcc/c-family/c-common.c:5007:9: error: unused variable ‘field’ [-Werror=unused-variable] tree field = build_decl (UNKNOWN_LOCATION, FIELD_DECL, NULL_TREE, ^ cc1plus: all warnings being treated as errors
[Bug c/52023] [C11] _Alignof (double) yields wrong value on x86
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023 Joseph S. Myers changed: What|Removed |Added Target Milestone|--- |4.9.0
[Bug c/52023] [C11] _Alignof (double) yields wrong value on x86
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023 Joseph S. Myers changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #14 from Joseph S. Myers --- Fixed for 4.9. The semantics of __alignof__ and C++11 alignof remain, deliberately, the alignment used outside structures.
[Bug c/52023] [C11] _Alignof (double) yields wrong value on x86
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023 --- Comment #13 from Joseph S. Myers --- Author: jsm28 Date: Wed Dec 4 22:57:20 2013 New Revision: 205685 URL: http://gcc.gnu.org/viewcvs?rev=205685&root=gcc&view=rev Log: PR c/52023 c-family: * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof and check field alignment if set. * c-common.h (c_sizeof_or_alignof_type): Update prototype. (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type. c: * c-parser.c (c_parser_alignas_specifier): Use c_sizeof_or_alignof_type instead of c_alignof. (c_parser_alignof_expression): Likewise, with min_alignof parameter depending on alignof spelling used. cp: * typeck.c (cxx_sizeof_or_alignof_type): Update call to c_sizeof_or_alignof_type. objc: * objc-act.c (objc_synthesize_getter): Update calls to c_sizeof_or_alignof_type. testsuite: * gcc.dg/c11-align-6.c: New test. Added: trunk/gcc/testsuite/gcc.dg/c11-align-6.c Modified: trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-common.c trunk/gcc/c-family/c-common.h trunk/gcc/c/ChangeLog trunk/gcc/c/c-parser.c trunk/gcc/cp/ChangeLog trunk/gcc/cp/typeck.c trunk/gcc/objc/ChangeLog trunk/gcc/objc/objc-act.c trunk/gcc/testsuite/ChangeLog
[Bug c/52023] [C11] _Alignof (double) yields wrong value on x86
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023 Richard Guenther changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2012-01-30 Component|target |c Summary|_Alignof (double) yields|[C11] _Alignof (double) |wrong value on x86 |yields wrong value on x86 Ever Confirmed|0 |1 --- Comment #12 from Richard Guenther 2012-01-30 09:42:04 UTC --- Confirmed thus, and a C frontend issue.