OSDN Git Service

2010-01-26 Robert Dewar <dewar@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / sem_prag.adb
index 1e742e5..3179933 100644 (file)
@@ -1420,7 +1420,7 @@ package body Sem_Prag is
 
          --  Record whether pragma is enabled
 
-         Set_PPC_Enabled (N, Check_Enabled (Pname));
+         Set_Pragma_Enabled (N, Check_Enabled (Pname));
 
          --  If we are within an inlined body, the legality of the pragma
          --  has been checked already.
@@ -5265,16 +5265,15 @@ package body Sem_Prag is
                      if Is_Entity_Name (Exp) then
                         null;
 
-                     --  Determine the string type from the presence
-                     --  Wide (_Wide) characters.
+                     --  For string literals, we assume Standard_String as the
+                     --  type, unless the string contains wide or wide_wide
+                     --  characters.
 
                      elsif Nkind (Exp) = N_String_Literal then
                         if Has_Wide_Wide_Character (Exp) then
                            Resolve (Exp, Standard_Wide_Wide_String);
-
                         elsif Has_Wide_Character (Exp) then
                            Resolve (Exp, Standard_Wide_String);
-
                         else
                            Resolve (Exp, Standard_String);
                         end if;
@@ -5790,6 +5789,7 @@ package body Sem_Prag is
 
             Check_Arg_Is_Identifier (Arg1);
             Check_On := Check_Enabled (Chars (Get_Pragma_Arg (Arg1)));
+            Set_Pragma_Enabled (N, Check_On);
 
             --  If expansion is active and the check is not enabled then we
             --  rewrite the Check as: