summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-25 16:21:34 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-25 16:21:34 +0000
commite4eabbe401dbe895ee4482cae862f945a985632b (patch)
treec94f2316bd7c83b8dca8ca43dae87d7f7e64182c
parentf9e4477e1ee4a41b6a35248b69d71f17914633f2 (diff)
downloadppe42-gcc-e4eabbe401dbe895ee4482cae862f945a985632b.tar.gz
ppe42-gcc-e4eabbe401dbe895ee4482cae862f945a985632b.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75021 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/c-common.c6
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3006e1ef7f4..5714a06ee1f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
2003-12-25 Kazu Hirata <kazu@cs.umass.edu>
* config/alpha/alpha-modes.def: Fix comment formatting.
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 9cdd1441098..3ba73dd2722 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))
OpenPOWER on IntegriCloud