===================================================================
@@ -2657,12 +2657,6 @@
Add_RACW_Features (Def_Id);
end if;
- -- Set no strict aliasing flag if config pragma seen
-
- if Opt.No_Strict_Aliasing then
- Set_No_Strict_Aliasing (Base_Type (Def_Id));
- end if;
-
when N_Array_Type_Definition =>
Array_Type_Declaration (T, Def);
===================================================================
@@ -176,6 +176,7 @@
#define Generate_SCO_Instance_Table opt__generate_sco_instance_table
#define GNAT_Mode opt__gnat_mode
#define List_Representation_Info opt__list_representation_info
+#define No_Strict_Aliasing_CP opt__no_strict_aliasing
typedef enum {Setjmp_Longjmp, Back_End_Exceptions} Exception_Mechanism_Type;
@@ -187,6 +188,7 @@
extern Boolean Generate_SCO_Instance_Table;
extern Boolean GNAT_Mode;
extern Int List_Representation_Info;
+extern Boolean No_Strict_Aliasing_CP;
/* restrict: */
===================================================================
@@ -667,6 +667,10 @@
/* Initialize the GCC support for FP operations. */
gnat_init_gcc_fp ();
+ /* Force -fno-strict-aliasing if the configuration pragma was seen. */
+ if (No_Strict_Aliasing_CP)
+ flag_strict_aliasing = 0;
+
/* Now translate the compilation unit proper. */
Compilation_Unit_to_gnu (gnat_root);