Commit 21c278c9 by Paolo Carlini

re PR c++/54249 ([C++11] No ::nullptr_t in header <stddef.h>)

2012-10-06  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/54249
	* ginclude/stddef.h: In C++11 mode declare nullptr_t in the global
	namespace.

/testsuite
2012-10-06  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/54249
	* g++.dg/cpp0x/stddef.C: New.

From-SVN: r192173
parent 55d5c6af
2012-10-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54249
* ginclude/stddef.h: In C++11 mode declare nullptr_t in the global
namespace.
2012-10-06 Jan Hubicka <jh@suse.cz> 2012-10-06 Jan Hubicka <jh@suse.cz>
PR lto/53831 PR lto/53831
......
...@@ -427,6 +427,13 @@ typedef struct { ...@@ -427,6 +427,13 @@ typedef struct {
#endif #endif
#endif /* C11 or C++11. */ #endif /* C11 or C++11. */
#if defined(__cplusplus) && __cplusplus >= 201103L
#ifndef _GXX_NULLPTR_T
#define _GXX_NULLPTR_T
typedef decltype(nullptr) nullptr_t;
#endif
#endif /* C++11. */
#endif /* _STDDEF_H was defined this time */ #endif /* _STDDEF_H was defined this time */
#endif /* !_STDDEF_H && !_STDDEF_H_ && !_ANSI_STDDEF_H && !__STDDEF_H__ #endif /* !_STDDEF_H && !_STDDEF_H_ && !_ANSI_STDDEF_H && !__STDDEF_H__
......
2012-10-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54249
* g++.dg/cpp0x/stddef.C: New.
2012-10-06 Janus Weil <janus@gcc.gnu.org> 2012-10-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/54832 PR fortran/54832
......
// PR c++/54249
// { dg-do compile { target c++11 } }
#include <stddef.h>
::nullptr_t n;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment