Commit e84319a3 by Eric Botcazou Committed by Eric Botcazou

decl.c (gnat_to_gnu_entity): Minor tweaks.

	* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Minor tweaks.
	* gcc-interface/trans.c (Pragma_to_gnu): Likewise.

From-SVN: r140904
parent afcea859
2008-10-06 Eric Botcazou <ebotcazou@adacore.com> 2008-10-06 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Minor tweaks.
* gcc-interface/trans.c (Pragma_to_gnu): Likewise.
2008-10-06 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (can_fold_for_view_convert_p): New predicate. * gcc-interface/utils.c (can_fold_for_view_convert_p): New predicate.
(unchecked_convert): Use it to disable problematic folding with (unchecked_convert): Use it to disable problematic folding with
VIEW_CONVERT_EXPR in the general case. Always disable it for the VIEW_CONVERT_EXPR in the general case. Always disable it for the
...@@ -1328,7 +1328,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) ...@@ -1328,7 +1328,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
&& (definition || Sloc (gnat_entity) > Standard_Location) && (definition || Sloc (gnat_entity) > Standard_Location)
&& ((Is_Public (gnat_entity) && ((Is_Public (gnat_entity)
&& !Present (Address_Clause (gnat_entity))) && !Present (Address_Clause (gnat_entity)))
|| optimize == 0 || !optimize
|| Address_Taken (gnat_entity) || Address_Taken (gnat_entity)
|| Is_Aliased (gnat_entity) || Is_Aliased (gnat_entity)
|| Is_Aliased (Etype (gnat_entity)))) || Is_Aliased (Etype (gnat_entity))))
...@@ -1343,7 +1343,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) ...@@ -1343,7 +1343,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
/* As debugging information will be generated for the variable, /* As debugging information will be generated for the variable,
do not generate information for the constant. */ do not generate information for the constant. */
DECL_IGNORED_P (gnu_decl) = true; DECL_IGNORED_P (gnu_decl) = 1;
} }
/* If this is declared in a block that contains a block with an /* If this is declared in a block that contains a block with an
......
...@@ -801,12 +801,12 @@ Pragma_to_gnu (Node_Id gnat_node) ...@@ -801,12 +801,12 @@ Pragma_to_gnu (Node_Id gnat_node)
(First (Pragma_Argument_Associations (gnat_node))))) (First (Pragma_Argument_Associations (gnat_node)))))
{ {
case Name_Time: case Name_Space: case Name_Time: case Name_Space:
if (optimize == 0) if (!optimize)
post_error ("insufficient -O value?", gnat_node); post_error ("insufficient -O value?", gnat_node);
break; break;
case Name_Off: case Name_Off:
if (optimize != 0) if (optimize)
post_error ("must specify -O0?", gnat_node); post_error ("must specify -O0?", gnat_node);
break; break;
......
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