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
This commit is contained in:
Andrew Pinski 2003-12-25 16:21:34 +00:00 committed by Andrew Pinski
parent df9fe6e576
commit 5a6159ddb9
2 changed files with 13 additions and 0 deletions

View File

@ -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.

View File

@ -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))