Commit 5a6159dd by Andrew Pinski Committed by Andrew Pinski

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
parent df9fe6e5
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.
......
......@@ -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),
......@@ -2810,6 +2813,9 @@ 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))
/* An object declared 'const' is only readonly after it is
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment