public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug libstdc++/56019] New: max_align_t should be in std namespace @ 2013-01-17 12:59 kretz at kde dot org 2013-01-17 14:53 ` [Bug libstdc++/56019] " redi at gcc dot gnu.org ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: kretz at kde dot org @ 2013-01-17 12:59 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56019 Bug #: 56019 Summary: max_align_t should be in std namespace Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: kretz@kde.org According to 3.11.2 in the C++11 standard max_align_t should be inside the std namespace (i.e. the text talks about use of alignof(std::max_align_t)). GCC only provides ::max_align_t, though: % cat main.cpp #include <cstddef> int main() { return alignof(std::max_align_t); } % /opt/gcc-4.7.2/bin/g++ -Wall -std=c++11 -o test main.cpp main.cpp: In function ‘int main()’: main.cpp:4:20: error: ‘max_align_t’ is not a member of ‘std’ main.cpp:4:20: note: suggested alternative: In file included from /home/.opt/gcc-4.7.2/bin/../lib/gcc/x86_64-suse-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cstddef:44:0, from main.cpp:1: /home/.opt/gcc-4.7.2/bin/../lib/gcc/x86_64-suse-linux-gnu/4.7.2/include/stddef.h:426:3: note: ‘max_align_t’ % /opt/gcc-4.8-snapshot/bin/g++ -Wall -std=c++11 -o test main.cpp main.cpp: In function ‘int main()’: main.cpp:4:20: error: ‘max_align_t’ is not a member of ‘std’ return alignof(std::max_align_t); ^ main.cpp:4:20: note: suggested alternative: In file included from /home/.opt/gcc-4.8-snapshot/include/c++/4.8.0/cstddef:44:0, from main.cpp:1: /home/.opt/gcc-4.8-snapshot/lib/gcc/x86_64-suse-linux-gnu/4.8.0/include/stddef.h:425:3: note: ‘max_align_t’ } max_align_t; ^ ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/56019] max_align_t should be in std namespace 2013-01-17 12:59 [Bug libstdc++/56019] New: max_align_t should be in std namespace kretz at kde dot org @ 2013-01-17 14:53 ` redi at gcc dot gnu.org 2013-06-11 9:17 ` paolo.carlini at oracle dot com ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: redi at gcc dot gnu.org @ 2013-01-17 14:53 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56019 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid Status|UNCONFIRMED |NEW Last reconfirmed| |2013-01-17 Ever Confirmed|0 |1 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-01-17 14:52:45 UTC --- <cstddef> just hasn't been updated since max_align_t was added to <stddef.h> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/56019] max_align_t should be in std namespace 2013-01-17 12:59 [Bug libstdc++/56019] New: max_align_t should be in std namespace kretz at kde dot org 2013-01-17 14:53 ` [Bug libstdc++/56019] " redi at gcc dot gnu.org @ 2013-06-11 9:17 ` paolo.carlini at oracle dot com 2013-06-11 9:54 ` paolo.carlini at oracle dot com ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: paolo.carlini at oracle dot com @ 2013-06-11 9:17 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56019 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |paolo.carlini at oracle dot com --- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> --- Mine. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/56019] max_align_t should be in std namespace 2013-01-17 12:59 [Bug libstdc++/56019] New: max_align_t should be in std namespace kretz at kde dot org 2013-01-17 14:53 ` [Bug libstdc++/56019] " redi at gcc dot gnu.org 2013-06-11 9:17 ` paolo.carlini at oracle dot com @ 2013-06-11 9:54 ` paolo.carlini at oracle dot com 2014-04-22 21:28 ` Jobst.Ziebell at mailbox dot tu-dresden.de ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: paolo.carlini at oracle dot com @ 2013-06-11 9:54 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56019 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED Target Milestone|--- |4.9.0 --- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> --- Fixed for 4.9.0. If somebody is interested in 4.8.x too, backporting the patch should not be a big deal. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/56019] max_align_t should be in std namespace 2013-01-17 12:59 [Bug libstdc++/56019] New: max_align_t should be in std namespace kretz at kde dot org ` (2 preceding siblings ...) 2013-06-11 9:54 ` paolo.carlini at oracle dot com @ 2014-04-22 21:28 ` Jobst.Ziebell at mailbox dot tu-dresden.de 2014-04-22 21:48 ` Jobst.Ziebell at mailbox dot tu-dresden.de 2014-04-23 13:03 ` redi at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: Jobst.Ziebell at mailbox dot tu-dresden.de @ 2014-04-22 21:28 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56019 Jobst.Ziebell at mailbox dot tu-dresden.de changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Jobst.Ziebell at mailbox dot tu-dr | |esden.de --- Comment #4 from Jobst.Ziebell at mailbox dot tu-dresden.de --- The fix introduces another problem. Whenever '__need_size_t' is defined prior to the inclusion of <cstddef>, the type 'max_align_t' will not have been defined. This inevitably causes a compiler error: #define __need_size_t #include <cstddef> int main( void ) { return 0; } This happens on Mac OS X 10.9. In my case it got triggered by including <gmp.h>. Presumably this bug also occurs when #defining the other '__need_*' macros. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/56019] max_align_t should be in std namespace 2013-01-17 12:59 [Bug libstdc++/56019] New: max_align_t should be in std namespace kretz at kde dot org ` (3 preceding siblings ...) 2014-04-22 21:28 ` Jobst.Ziebell at mailbox dot tu-dresden.de @ 2014-04-22 21:48 ` Jobst.Ziebell at mailbox dot tu-dresden.de 2014-04-23 13:03 ` redi at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: Jobst.Ziebell at mailbox dot tu-dresden.de @ 2014-04-22 21:48 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56019 --- Comment #5 from Jobst.Ziebell at mailbox dot tu-dresden.de --- I would propose adding something like #ifdef _GCC_MAX_ALIGN_T ... #endif around the 'using' declaration. (Though I really have no idea whatsoever off gcc internals...) ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/56019] max_align_t should be in std namespace 2013-01-17 12:59 [Bug libstdc++/56019] New: max_align_t should be in std namespace kretz at kde dot org ` (4 preceding siblings ...) 2014-04-22 21:48 ` Jobst.Ziebell at mailbox dot tu-dresden.de @ 2014-04-23 13:03 ` redi at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: redi at gcc dot gnu.org @ 2014-04-23 13:03 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56019 --- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jobst.Ziebell from comment #4) > Presumably this bug also occurs when #defining the other '__need_*' macros. Which user code should never be doing anyway. GMP is broken (and already fixed upstream). This is documented at http://gcc.gnu.org/gcc-4.9/porting_to.html and isn't going to be changed to accomodate broken libraries. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-04-23 13:03 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-01-17 12:59 [Bug libstdc++/56019] New: max_align_t should be in std namespace kretz at kde dot org 2013-01-17 14:53 ` [Bug libstdc++/56019] " redi at gcc dot gnu.org 2013-06-11 9:17 ` paolo.carlini at oracle dot com 2013-06-11 9:54 ` paolo.carlini at oracle dot com 2014-04-22 21:28 ` Jobst.Ziebell at mailbox dot tu-dresden.de 2014-04-22 21:48 ` Jobst.Ziebell at mailbox dot tu-dresden.de 2014-04-23 13:03 ` redi at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).