diff options
author | Andrew Pinski <pinskia@physics.uc.edu> | 2003-12-25 16:21:34 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2003-12-25 08:21:34 -0800 |
commit | 5a6159ddb9f1c5a0bf70ae1535023f8a19870251 (patch) | |
tree | c94f2316bd7c83b8dca8ca43dae87d7f7e64182c /gcc/c-common.c | |
parent | df9fe6e5769b2bf4abaafbb3a3f0e3138abb5a8a (diff) | |
download | gcc-5a6159ddb9f1c5a0bf70ae1535023f8a19870251.zip gcc-5a6159ddb9f1c5a0bf70ae1535023f8a19870251.tar.gz gcc-5a6159ddb9f1c5a0bf70ae1535023f8a19870251.tar.bz2 |
PR C++/13429, C/11944
2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
PR C++/13429, C/11944
* c-common.c (c_build_qualified_type): Return early when type is
error_mark_node.
(c_apply_type_quals_to_decl): Likewise.
From-SVN: r75021
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 9cdd144..3ba73dd2 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -2784,6 +2784,9 @@ static tree builtin_function_2 (const char *, const char *, tree, tree, tree c_build_qualified_type (tree type, int type_quals) { + if (type == error_mark_node) + return type; + if (TREE_CODE (type) == ARRAY_TYPE) return build_array_type (c_build_qualified_type (TREE_TYPE (type), type_quals), @@ -2809,6 +2812,9 @@ void c_apply_type_quals_to_decl (int type_quals, tree decl) { tree type = TREE_TYPE (decl); + + if (type == error_mark_node) + return; if (((type_quals & TYPE_QUAL_CONST) || (type && TREE_CODE (type) == REFERENCE_TYPE)) |