summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_prag.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2004-05-10 18:18:54 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2004-05-10 18:18:54 +0200
commit5950a3ac274c2c85e38a959e1231c75c564c9c2f (patch)
treeb05f1a8a1cace3f818e7721e71eb91c837736b59 /gcc/ada/sem_prag.adb
parent7cef5027e19c7e27d9ffc448fc8a775667a8df32 (diff)
downloadgcc-5950a3ac274c2c85e38a959e1231c75c564c9c2f.tar.gz
[multiple changes]
2004-05-10 Doug Rupp <rupp@gnat.com> * 5qsystem.ads: Remove Short_Address subtype declaration. Moved to system.aux_dec. * s-auxdec.ads: Add Short_Address subtype (moved here from System). * Makefile.in: [VMS]: Add translation for 5qauxdec.ads. * init.c: [VMS] Macroize LIB$ calls for IA64 and Alpha. Fixes undefined symbols in IA64 gnatlib. * 5vinmaop.adb: Reference s-auxdec for Short_Address. * 5xsystem.ads, 5vsystem.ads: Back out last change (addition of subtype Short_Address). This will be moved to system.auxdec. 2004-05-10 Thomas Quinot <quinot@act-europe.fr> * sem_util.adb: Replace test for presence of a node that is always present with a call to Discard_Node. * sem_ch10.adb (Analyze_Compilation_Unit): Remove superfluous call to Analyze on the library unit node after generation of distribution stub constructs. The call was a no-op because Unit_Node has already been Analyzed, and the tree fragments for the distribution stubs are analyzed as they are inserted in Exp_Dist. Update comment regarding to distribution stubs to reflect that we do not generate stub in separate files anymore. * einfo.ads: Clarify the fact that a tagged private type has the E_Record_Type_With_Private Ekind. * erroutc.adb: Minor reformatting * erroutc.ads (Max_Msg_Length): Increase to cover possible larger values if line length is increased using -gnatyM (noticed during code reading). * eval_fat.adb: Minor reformatting Put spaces around exponentiation operator 2004-05-10 Ed Schonberg <schonberg@gnat.com> PR ada/15005 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): If prefix has been rewritten as an explicit dereference, retrieve type of original node to check for possibly unconstrained record type. 2004-05-10 Ed Schonberg <schonberg@gnat.com> * exp_ch7.adb (Check_Visibly_Controlled): If given operation is not overriding, use the operation of the parent unconditionally. * sem_ch4.adb (Remove_Address_Interpretations): Remove address operation when either operand is a literal, to avoid further ambiguities. * sem_ch6.adb (New_Overloaded_Entity): If new entity is inherited and overridden by a previous explicit declaration, mark the previous entity as overriding. * sem_disp.adb (Check_Dispatching_Operation): New predicate Is_Visibly_Controlled, to determine whether a declaration of a primitive control operation for a derived type overrides an inherited one. Add warning if the explicit declaration does not override. 2004-05-10 Vincent Celier <celier@gnat.com> * gnatls.adb (Gnatls): Initialize Snames, to avoid assertion error in some cases when the sources are no longer present. * make.adb (Collect_Arguments): Fail if an external source, not part of any project need to be compiled, when switch -x has not been specified. * makeusg.adb: Document new switch -x * opt.ads (External_Unit_Compilation_Allowed): New Boolean flag, defaulted to False. * switch-m.adb (Scan_Make_Switches): New switch -x * vms_data.ads: Add VMS qualifier /NON_PROJECT_UNIT_COMPILATION for gnatmake switch -x. * gnat_ugn.texi: Document new gnatmake switch -x 2004-05-10 Eric Botcazou <ebotcazou@act-europe.fr> * misc.c (gnat_init_options): Set flag_zero_initialized_in_bss to 0. * utils.c (create_var_decl): Do not modify the DECL_COMMON flag. (process_attributes): Likewise. 2004-05-10 Joel Brobecker <brobecker@gnat.com> * s-inmaop.ads: Fix spelling mistake in one of the comments. 2004-05-10 Robert Dewar <dewar@gnat.com> * gnat_ugn.texi: Document that for config pragma files, the maximum line length is always 32767. * gnat_rm.texi: For pragma Eliminate, note that concatenation of string literals is now allowed. * gnat-style.texi: Remove statement about splitting long lines before an operator rather than after, since we do not follow this rule at all. Clarify rule (really lack of rule) for spaces around exponentiation * sem_elim.adb: Allow concatenation of string literals as well as a single string literal for pragma arguments. * sem_prag.ads, sem_prag.adb: (Is_Config_Static_String): New function * a-textio.adb (Terminate_Line): Do not add line feed if nothing written for append case. * frontend.adb: Changes to avoid checking max line length in config pragma files. * g-os_lib.ads: Minor reformatting * mlib-utl.adb: Do not define Max_Line_Length locally (definition was wrong in any case. Instead use standard value. Noticed during code reading. * opt.ads (Max_Line_Length): New field, used to implement removal of limitation on length of lines when scanning config pragma files. * osint.ads, prj-dect.adb, prj-strt.adb, prj-tree.adb, makeutl.ads, makeutl.adb: Minor reformatting * scn.adb: Do not check line length while scanning config pragma files Do not check line length while scanning out license information * scng.adb: Changes to avoid line length checks while parsing config pragma files. 2004-05-10 GNAT Script <nobody@gnat.com> * Make-lang.in: Makefile automatically updated From-SVN: r81671
Diffstat (limited to 'gcc/ada/sem_prag.adb')
-rw-r--r--gcc/ada/sem_prag.adb62
1 files changed, 60 insertions, 2 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index b7c3cafa0b5..5ab5bdeed45 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -9916,7 +9916,6 @@ package body Sem_Prag is
when Unknown_Pragma =>
raise Program_Error;
-
end case;
exception
@@ -9948,7 +9947,7 @@ package body Sem_Prag is
and then
(Is_Generic_Instance (Result)
or else Nkind (Parent (Declaration_Node (Result))) =
- N_Subprogram_Renaming_Declaration)
+ N_Subprogram_Renaming_Declaration)
and then Present (Alias (Result))
loop
Result := Alias (Result);
@@ -9957,6 +9956,65 @@ package body Sem_Prag is
return Result;
end Get_Base_Subprogram;
+ -----------------------------
+ -- Is_Config_Static_String --
+ -----------------------------
+
+ function Is_Config_Static_String (Arg : Node_Id) return Boolean is
+
+ function Add_Config_Static_String (Arg : Node_Id) return Boolean;
+ -- This is an internal recursive function that is just like the
+ -- outer function except that it adds the string to the name buffer
+ -- rather than placing the string in the name buffer.
+
+ ------------------------------
+ -- Add_Config_Static_String --
+ ------------------------------
+
+ function Add_Config_Static_String (Arg : Node_Id) return Boolean is
+ N : Node_Id;
+ C : Char_Code;
+
+ begin
+ N := Arg;
+
+ if Nkind (N) = N_Op_Concat then
+ if Add_Config_Static_String (Left_Opnd (N)) then
+ N := Right_Opnd (N);
+ else
+ return False;
+ end if;
+ end if;
+
+ if Nkind (N) /= N_String_Literal then
+ Error_Msg_N ("string literal expected for pragma argument", N);
+ return False;
+
+ else
+ for J in 1 .. String_Length (Strval (N)) loop
+ C := Get_String_Char (Strval (N), J);
+
+ if not In_Character_Range (C) then
+ Error_Msg
+ ("string literal contains invalid wide character",
+ Sloc (N) + 1 + Source_Ptr (J));
+ return False;
+ end if;
+
+ Add_Char_To_Name_Buffer (Get_Character (C));
+ end loop;
+ end if;
+
+ return True;
+ end Add_Config_Static_String;
+
+ -- Start of prorcessing for Is_Config_Static_String
+
+ begin
+ Name_Len := 0;
+ return Add_Config_Static_String (Arg);
+ end Is_Config_Static_String;
+
-----------------------------------------
-- Is_Non_Significant_Pragma_Reference --
-----------------------------------------