This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Use correct predicate for static expressions

Really a minor detail, but still.

Tested on x86_64-suse-linux, applied on the mainline.

2014-04-15  Eric Botcazou  <>

	* gcc-interface/decl.c (prepend_one_attribute_pragma): Call
	Is_OK_Static_Expression in lieu of Is_Static_Expression to
	detect valid arguments.

Eric Botcazou
Index: gcc-interface/decl.c
--- gcc-interface/decl.c	(revision 209404)
+++ gcc-interface/decl.c	(working copy)
@@ -6151,7 +6151,8 @@ prepend_one_attribute_pragma (struct att
       Node_Id gnat_arg0 = Next (First (gnat_arg));
       Node_Id gnat_arg1 = Empty;
-      if (Present (gnat_arg0) && Is_Static_Expression (Expression (gnat_arg0)))
+      if (Present (gnat_arg0)
+	  && Is_OK_Static_Expression (Expression (gnat_arg0)))
 	  gnu_arg0 = gnat_to_gnu (Expression (gnat_arg0));
@@ -6165,7 +6166,8 @@ prepend_one_attribute_pragma (struct att
 	  gnat_arg1 = Next (gnat_arg0);
-      if (Present (gnat_arg1) && Is_Static_Expression (Expression (gnat_arg1)))
+      if (Present (gnat_arg1)
+	  && Is_OK_Static_Expression (Expression (gnat_arg1)))
 	  gnu_arg1 = gnat_to_gnu (Expression (gnat_arg1));

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]