aboutsummaryrefslogtreecommitdiff
path: root/gcc/ginclude/stdnoreturn.h
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2011-08-18 22:35:42 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2011-08-18 22:35:42 +0100
commitbbceee64bef15b92b1f9b964b8d371bd07ea794a (patch)
tree7cac89ed01db35f3172a81cb7429efeb4d9798e7 /gcc/ginclude/stdnoreturn.h
parent32fe396e05443a67367a3c454b7c6d574ea7e58e (diff)
downloadgcc-bbceee64bef15b92b1f9b964b8d371bd07ea794a.zip
gcc-bbceee64bef15b92b1f9b964b8d371bd07ea794a.tar.gz
gcc-bbceee64bef15b92b1f9b964b8d371bd07ea794a.tar.bz2
c-decl.c (shadow_tag_warned): Check for _Noreturn.
* c-decl.c (shadow_tag_warned): Check for _Noreturn. (quals_from_declspecs): Assert _Noreturn not present. (grokdeclarator): Handle _Noreturn. (build_null_declspecs): Initialize noreturn_p. (declspecs_add_scspec): Handle RID_NORETURN. * c-parser.c (c_token_starts_declspecs, c_parser_declspecs) (c_parser_attributes): Handle RID_NORETURN. * c-tree.h (struct c_declspecs): Add noreturn_p. * ginclude/stdnoreturn.h: New. * Makefile.in (USER_H): Add stdnoreturn.h. c-family: * c-common.c (c_common_reswords): Add _Noreturn. (keyword_is_function_specifier): Handle RID_NORETURN. * c-common.h (RID_NORETURN): New. testsuite: * gcc.dg/c1x-noreturn-1.c, gcc.dg/c1x-noreturn-2.c, gcc.dg/c1x-noreturn-3.c, gcc.dg/c1x-noreturn-4.c, gcc.dg/c1x-noreturn-5.c: New tests. From-SVN: r177881
Diffstat (limited to 'gcc/ginclude/stdnoreturn.h')
-rw-r--r--gcc/ginclude/stdnoreturn.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/ginclude/stdnoreturn.h b/gcc/ginclude/stdnoreturn.h
new file mode 100644
index 0000000..c92537c
--- /dev/null
+++ b/gcc/ginclude/stdnoreturn.h
@@ -0,0 +1,31 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+/* ISO C1X: 7.23 _Noreturn <stdnoreturn.h>. */
+
+#ifndef _STDNORETURN_H
+#define _STDNORETURN_H
+
+#define noreturn _Noreturn
+
+#endif /* stdnoreturn.h */