summaryrefslogtreecommitdiff
path: root/gcc/ginclude
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-06 22:44:12 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-06 22:44:12 +0000
commit24b73c8c4c2f336b0b4d400e8c653f88f7c205a2 (patch)
tree80d49f82c98375af91e9f035dd46564ae94eae56 /gcc/ginclude
parent9d4632754778971fa50e5789be76eab5fe88f020 (diff)
downloadgcc-24b73c8c4c2f336b0b4d400e8c653f88f7c205a2.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192173 138bc75d-0d04-0410-961f-82ee72b054a4
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 fc8cfa674f0..9f6e7419ca1 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__