aboutsummaryrefslogtreecommitdiff
path: root/gcc/ginclude
diff options
context:
space:
mode:
authorPaolo Carlini <paolo@gcc.gnu.org>2012-10-06 22:44:12 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2012-10-06 22:44:12 +0000
commit21c278c93069690772a23f9c162eeac0030b10f7 (patch)
tree80d49f82c98375af91e9f035dd46564ae94eae56 /gcc/ginclude
parent55d5c6aff7d868b5a5abf89908df29603fd37f92 (diff)
downloadgcc-21c278c93069690772a23f9c162eeac0030b10f7.zip
gcc-21c278c93069690772a23f9c162eeac0030b10f7.tar.gz
gcc-21c278c93069690772a23f9c162eeac0030b10f7.tar.bz2
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
Diffstat (limited to 'gcc/ginclude')
-rw-r--r--gcc/ginclude/stddef.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
index fc8cfa6..9f6e741 100644
--- a/gcc/ginclude/stddef.h
+++ b/gcc/ginclude/stddef.h
@@ -427,6 +427,13 @@ typedef struct {
#endif
#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 && !_STDDEF_H_ && !_ANSI_STDDEF_H && !__STDDEF_H__