public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/54249] New: [C++11] No ::nullptr_t in header <stddef.h>
@ 2012-08-14  8:04 daniel.kruegler at googlemail dot com
  2012-08-14  8:05 ` [Bug libstdc++/54249] " daniel.kruegler at googlemail dot com
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2012-08-14  8:04 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54249

             Bug #: 54249
           Summary: [C++11] No ::nullptr_t in header <stddef.h>
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: daniel.kruegler@googlemail.com


gcc 4.8.0 20120729 (experimental) rejects the following code:

#include <stddef.h>

::nullptr_t n;

"3|error: 'nullptr_t' in namespace '::' does not name a type"

This code is supposed to be accepted, because [depr.c.headers] p2 says:

"Every C header, each of which has a name of the form name.h, behaves as if
each name placed in the standard library namespace by the corresponding cname
header is placed within the global namespace scope."

Paolo Carlini has suggested to perform this change near to existing C++11-aware
code in stddef.h:

#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) \
  || (defined(__cplusplus) && __cplusplus >= 201103L)
#ifndef _GCC_MAX_ALIGN_T
#define _GCC_MAX_ALIGN_T
/* Type whose alignment is supported in every context and is at least
   as great as that of any standard type not using alignment
   specifiers.  */
typedef struct {
  long long __max_align_ll __attribute__((__aligned__(__alignof__(long
long))));
  long double __max_align_ld __attribute__((__aligned__(__alignof__(long
double))));
} max_align_t;
#endif
#endif /* C11 or C++11.  */

[I guess I have selected the wrong component. Please correct, if necessary]


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2012-10-06 22:47 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-14  8:04 [Bug libstdc++/54249] New: [C++11] No ::nullptr_t in header <stddef.h> daniel.kruegler at googlemail dot com
2012-08-14  8:05 ` [Bug libstdc++/54249] " daniel.kruegler at googlemail dot com
2012-08-14  9:36 ` glisse at gcc dot gnu.org
2012-08-14  9:52 ` daniel.kruegler at googlemail dot com
2012-08-14 10:36 ` glisse at gcc dot gnu.org
2012-08-14 10:38 ` paolo.carlini at oracle dot com
2012-08-14 10:49 ` glisse at gcc dot gnu.org
2012-08-14 10:50 ` redi at gcc dot gnu.org
2012-08-14 10:52 ` paolo.carlini at oracle dot com
2012-08-14 10:56 ` paolo.carlini at oracle dot com
2012-08-14 10:59 ` redi at gcc dot gnu.org
2012-08-14 11:02 ` daniel.kruegler at googlemail dot com
2012-08-14 11:10 ` daniel.kruegler at googlemail dot com
2012-09-28 10:01 ` [Bug c++/54249] " paolo.carlini at oracle dot com
2012-09-28 10:03 ` paolo.carlini at oracle dot com
2012-10-06 22:44 ` paolo at gcc dot gnu.org
2012-10-06 22:47 ` paolo.carlini at oracle dot com

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).