aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/builtins.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2002-07-06 00:16:44 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2002-07-06 00:16:44 +0000
commitdf061a43b6051ab6d4756f1e5676c1e16b4a4f99 (patch)
treeda467fb72d54d71cd83e12f6ba76c83be6c4cb53 /gcc/java/builtins.c
parente5eb8de83c189172ca3944fee397ceaca60ad4ae (diff)
downloadgcc-df061a43b6051ab6d4756f1e5676c1e16b4a4f99.zip
gcc-df061a43b6051ab6d4756f1e5676c1e16b4a4f99.tar.gz
gcc-df061a43b6051ab6d4756f1e5676c1e16b4a4f99.tar.bz2
re PR c++/7099 (G++ doesn't set the noreturn attribute on std::exit and std::abort)
PR c++/7099 * builtin-attrs.def: Define new attribute lists for use in builtins.def. * builtins.def [DEF_BUILTIN]: Modify to take an additional ATTRS argument, an enumerated value defined in builtin-attrs.def that represents the attribute list for the builtins. Modify all builtin functions to pass an appropriate attribute list. Specify "abort", "exit", "_exit" and "_Exit" builtins here with their required noreturn attributes. * tree.h (enum_builtin_function): Ignore the additional parameter to DEF_BUILTIN. * builtins.c (built_in_names): Likewise. * c-common.c: (builtin_function_2): Replace the "int noreturn_p" argument with a tree representing the functions attribute list. Pass this "attrs" argument to builtin_function. No longer handle the noreturn_p processing manually. (built_in_attributes): Move the definitions from builtin-attrs.def before c_common_nodes_and_builtins. (c_common_nodes_and_builtins): Handle the new ATTRS parameter in DEF_BUILTIN, passing it to both builtin_function and the changed builtin_function_2. * doc/extend.texi: Document __builtin_abort, __builtin_exit, __builtin__exit and __builtin__Exit. * java/builtins.c (initialize_builtins): Ignore the additional parameter to DEF_BUILTIN. Handle more C/C++ specific junk in the builtins.def file. From-SVN: r55276
Diffstat (limited to 'gcc/java/builtins.c')
-rw-r--r--gcc/java/builtins.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/java/builtins.c b/gcc/java/builtins.c
index c167df5..dafad79 100644
--- a/gcc/java/builtins.c
+++ b/gcc/java/builtins.c
@@ -284,6 +284,8 @@ initialize_builtins ()
#define va_list_ref_type_node NULL_TREE
#define va_list_arg_type_node NULL_TREE
#define flag_isoc99 0
+#define c_language 0
+#define clk_cplusplus 0
#define DEF_PRIMITIVE_TYPE(ENUM, VALUE) \
builtin_types[(int) ENUM] = VALUE;
@@ -314,7 +316,7 @@ initialize_builtins ()
#include "builtin-types.def"
#define DEF_BUILTIN(ENUM, NAME, CLASS, TYPE, LIBTYPE, BOTH_P, \
- FALLBACK_P, NONANSI_P) \
+ FALLBACK_P, NONANSI_P, ATTRS) \
define_builtin (ENUM, NAME, CLASS, builtin_types[TYPE], FALLBACK_P);
#include "builtins.def"
}