summaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-06 14:21:20 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-06 14:21:20 +0000
commitfef772a5d0656a9dfcf2f28240966406c6ee8eb7 (patch)
tree22743ad17c4fb05c9d0205bbb36a11d6338a0918 /gcc/ada
parent8cdd325744c3673a6939b9bbdabde4778feca96e (diff)
downloadgcc-fef772a5d0656a9dfcf2f28240966406c6ee8eb7.tar.gz
2004-04-06 Pascal Obry <obry@gnat.com>
* adaint.c (DIR_SEPARATOR): Properly set DIR_SEPARATOR on Win32. * osint.adb (Program_Name): Do not look past a directory separator. 2004-04-06 Thomas Quinot <quinot@act-europe.fr> * atree.adb: Update comment (Rewrite_Substitute_Node no longer exists). * exp_ch6.adb (Rewrite_Function_Call): Clarify documentation of requirement for preserving a copy of the original assignment node. * sinfo.ads: Update comment (Original_Tree -> Original_Node). 2004-04-06 Olivier Hainque <hainque@act-europe.fr> (__gnat_initialize [Vxworks]): Enable references to the crtstuff bits when supported. 2004-04-06 Ed Schonberg <schonberg@gnat.com> * sem_ch4.adb (Remove_Abstract_Operations): Extend previous changes to operator calls in functional notation, and apply Universal_Interpretation to operands, not to their type. 2004-04-06 Robert Dewar <dewar@gnat.com> * 5wdirval.adb: Minor reformatting 2004-04-06 Ed Falis <falis@gnat.com> * gnat_rm.texi: Improve a reference to the GCC manual git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80453 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/5wdirval.adb14
-rw-r--r--gcc/ada/ChangeLog34
-rw-r--r--gcc/ada/adaint.c3
-rw-r--r--gcc/ada/atree.adb3
-rw-r--r--gcc/ada/exp_ch6.adb3
-rw-r--r--gcc/ada/gnat_rm.texi18
-rw-r--r--gcc/ada/init.c15
-rw-r--r--gcc/ada/osint.adb10
-rw-r--r--gcc/ada/sem_ch4.adb48
-rw-r--r--gcc/ada/sinfo.ads2
10 files changed, 118 insertions, 32 deletions
diff --git a/gcc/ada/5wdirval.adb b/gcc/ada/5wdirval.adb
index 4607fb17791..a20ff177973 100644
--- a/gcc/ada/5wdirval.adb
+++ b/gcc/ada/5wdirval.adb
@@ -52,6 +52,7 @@ package body Ada.Directories.Validity is
function Is_Valid_Path_Name (Name : String) return Boolean is
Start : Positive := Name'First;
Last : Natural;
+
begin
-- A path name cannot be empty, cannot contain more than 256 characters,
-- cannot contain invalid characters and each directory/file name need
@@ -114,7 +115,8 @@ package body Ada.Directories.Validity is
--------------------------
function Is_Valid_Simple_Name (Name : String) return Boolean is
- Only_Spaces : Boolean := True;
+ Only_Spaces : Boolean;
+
begin
-- A file name cannot be empty, cannot contain more than 256 characters,
-- and cannot contain invalid characters, including '\'
@@ -122,20 +124,22 @@ package body Ada.Directories.Validity is
if Name'Length = 0 or else Name'Length > 256 then
return False;
+ -- Name length is OK
+
else
+ Only_Spaces := True;
for J in Name'Range loop
if Invalid_Character (Name (J)) or else Name (J) = '\' then
return False;
-
elsif Name (J) /= ' ' then
Only_Spaces := False;
end if;
end loop;
- end if;
- -- If Name follows the rules, it is valid
+ -- If no invalid chars, and not all spaces, file name is valid.
- return not Only_Spaces;
+ return not Only_Spaces;
+ end if;
end Is_Valid_Simple_Name;
end Ada.Directories.Validity;
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 2cd3dd6126f..5ca1aeb4b00 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,37 @@
+2004-04-06 Pascal Obry <obry@gnat.com>
+
+ * adaint.c (DIR_SEPARATOR): Properly set DIR_SEPARATOR on Win32.
+
+ * osint.adb (Program_Name): Do not look past a directory separator.
+
+2004-04-06 Thomas Quinot <quinot@act-europe.fr>
+
+ * atree.adb: Update comment (Rewrite_Substitute_Node no longer exists).
+
+ * exp_ch6.adb (Rewrite_Function_Call): Clarify documentation of
+ requirement for preserving a copy of the original assignment node.
+
+ * sinfo.ads: Update comment (Original_Tree -> Original_Node).
+
+2004-04-06 Olivier Hainque <hainque@act-europe.fr>
+
+ (__gnat_initialize [Vxworks]): Enable references to the crtstuff bits
+ when supported.
+
+2004-04-06 Ed Schonberg <schonberg@gnat.com>
+
+ * sem_ch4.adb (Remove_Abstract_Operations): Extend previous changes to
+ operator calls in functional notation, and apply
+ Universal_Interpretation to operands, not to their type.
+
+2004-04-06 Robert Dewar <dewar@gnat.com>
+
+ * 5wdirval.adb: Minor reformatting
+
+2004-04-06 Ed Falis <falis@gnat.com>
+
+ * gnat_rm.texi: Improve a reference to the GCC manual
+
2004-04-05 Vincent Celier <celier@gnat.com>
* adaint.h, adaint.c: Add function __gnat_named_file_length
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index 4c1430dd235..67a457c35d2 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -147,6 +147,8 @@ struct vstring
#if defined (_WIN32)
#include <dir.h>
#include <windows.h>
+#undef DIR_SEPARATOR
+#define DIR_SEPARATOR '\\'
#endif
#include "adaint.h"
@@ -2525,4 +2527,3 @@ get_gcc_version (void)
{
return 3;
}
-
diff --git a/gcc/ada/atree.adb b/gcc/ada/atree.adb
index d410a33c108..49938b98ece 100644
--- a/gcc/ada/atree.adb
+++ b/gcc/ada/atree.adb
@@ -2114,8 +2114,7 @@ package body Atree is
-- Since we are doing a replace, we assume that the original node
-- is intended to become the new replaced node. The call would be
- -- to Rewrite_Substitute_Node if there were an intention to save
- -- the original node.
+ -- to Rewrite if there were an intention to save the original node.
Orig_Nodes.Table (Old_Node) := Old_Node;
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index a405d6bece5..1bfb5c1c86d 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -2466,6 +2466,9 @@ package body Exp_Ch6 is
-- complete assignment subtree consistent enough for
-- Analyze_Assignment to proceed. We do not use the
-- saved value, the point was just to do the relocation.
+ -- We cannot rely on Original_Node to go back from the
+ -- block node to the assignment node, because the
+ -- assignment might already be a rewrite substitution.
begin
Rewrite (Original_Assignment, Blk);
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index 9a89b325cb7..b3097a1b592 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -62,7 +62,7 @@ GNAT Reference Manual
@noindent
GNAT, The GNU Ada 95 Compiler@*
-Version for GCC @value{version-GCC}@*
+GCC version @value{version-GCC}@*
@noindent
Ada Core Technologies, Inc.
@@ -12688,15 +12688,17 @@ including machine instructions in a subprogram.
@end itemize
@noindent
-The two features are similar, and both closely related to the mechanism
+The two features are similar, and both are closely related to the mechanism
provided by the asm instruction in the GNU C compiler. Full understanding
and use of the facilities in this package requires understanding the asm
-instruction as described in
-@cite{Using and Porting the GNU Compiler Collection (GCC)} by Richard
-Stallman. Calls to the function @code{Asm} and the procedure @code{Asm}
-have identical semantic restrictions and effects as described below.
-Both are provided so that the procedure call can be used as a statement,
-and the function call can be used to form a code_statement.
+instruction as described in @cite{Using the GNU Compiler Collection (GCC)}
+by Richard Stallman. The relevant section is titled ``Extensions to the C
+Language Family'' -> ``Assembler Instructions with C Expression Operands''.
+
+Calls to the function @code{Asm} and the procedure @code{Asm} have identical
+semantic restrictions and effects as described below. Both are provided so
+that the procedure call can be used as a statement, and the function call
+can be used to form a code_statement.
The first example given in the GCC documentation is the C @code{asm}
instruction:
diff --git a/gcc/ada/init.c b/gcc/ada/init.c
index 50e0feb085a..e627a8bde2e 100644
--- a/gcc/ada/init.c
+++ b/gcc/ada/init.c
@@ -1797,13 +1797,16 @@ __gnat_initialize (void)
call the appropriate function here. We'll never unload that, so there is
no de-registration to worry about.
- We can differentiate between the two cases by looking at the
- __module_has_ctors value provided by each class of crt objects. As of
- today, selecting the crt set intended for applications to be statically
- linked with the kernel is triggered by adding "-static" to the gcc *link*
- command line options. */
+ We can differentiate by looking at the __module_has_ctors value provided
+ by each class of crt objects. As of today, selecting the crt set intended
+ for applications to be statically linked with the kernel is triggered by
+ adding "-static" to the gcc *link* command line options.
-#if 0
+ This is a first approach, tightly synchronized with a number of GCC
+ configuration and crtstuff changes. We need to ensure that those changes
+ are there to activate this circuitry. */
+
+#if DWARF2_UNWIND_INFO && defined (_ARCH_PPC)
{
extern const int __module_has_ctors;
extern void __do_global_ctors ();
diff --git a/gcc/ada/osint.adb b/gcc/ada/osint.adb
index 07355ed9ba2..e2e559fac7e 100644
--- a/gcc/ada/osint.adb
+++ b/gcc/ada/osint.adb
@@ -1794,8 +1794,18 @@ package body Osint is
-- "alpha-dec-vxworks-"
while Name_Len > 0 loop
+
+ -- All done if we find the last hyphen
+
if Name_Buffer (Name_Len) = '-' then
exit;
+
+ -- If directory separator found, we don't want to look further
+ -- since in this case, no prefix has been found.
+
+ elsif Is_Directory_Separator (Name_Buffer (Name_Len)) then
+ Name_Len := 0;
+ exit;
end if;
Name_Len := Name_Len - 1;
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index 1ac9b4491fd..9388125aaf1 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -4359,20 +4359,18 @@ package body Sem_Ch4 is
-- always added to the overload set, unless it is a universal
-- operation.
- if Nkind (N) in N_Op
- and then Has_Abstract_Op
- then
+ if not Has_Abstract_Op then
+ return;
+
+ elsif Nkind (N) in N_Op then
if Nkind (N) in N_Unary_Op
- and then
- Present (Universal_Interpretation (Etype (Right_Opnd (N))))
+ and then Present (Universal_Interpretation (Right_Opnd (N)))
then
return;
elsif Nkind (N) in N_Binary_Op
- and then
- Present (Universal_Interpretation (Etype (Right_Opnd (N))))
- and then
- Present (Universal_Interpretation (Etype (Left_Opnd (N))))
+ and then Present (Universal_Interpretation (Right_Opnd (N)))
+ and then Present (Universal_Interpretation (Left_Opnd (N)))
then
return;
@@ -4386,6 +4384,38 @@ package body Sem_Ch4 is
Get_Next_Interp (I, It);
end loop;
end if;
+
+ elsif Nkind (N) = N_Function_Call
+ and then
+ (Nkind (Name (N)) = N_Operator_Symbol
+ or else
+ (Nkind (Name (N)) = N_Expanded_Name
+ and then
+ Nkind (Selector_Name (Name (N))) = N_Operator_Symbol))
+ then
+ declare
+ Arg1 : constant Node_Id := First (Parameter_Associations (N));
+
+ begin
+ if Present (Universal_Interpretation (Arg1))
+ or else
+ (Present (Next (Arg1))
+ and then
+ Present (Universal_Interpretation (Next (Arg1))))
+ then
+ return;
+
+ else
+ Get_First_Interp (N, I, It);
+ while Present (It.Nam) loop
+ if Scope (It.Nam) = Standard_Standard then
+ Remove_Interp (I);
+ end if;
+
+ Get_Next_Interp (I, It);
+ end loop;
+ end if;
+ end;
end if;
end if;
end Remove_Abstract_Operations;
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads
index 5ee8fb38827..c86ac9d8322 100644
--- a/gcc/ada/sinfo.ads
+++ b/gcc/ada/sinfo.ads
@@ -1519,7 +1519,7 @@ package Sinfo is
-- stub. During the analysis procedure, stubs in some situations
-- get rewritten by the corresponding bodies, and we set this flag
-- to remember that this happened. Note that it is not good enough
- -- to rely on the use of Original_Tree here because of the case of
+ -- to rely on the use of Original_Node here because of the case of
-- nested instantiations where the substituted node can be copied.
-- Zero_Cost_Handling (Flag5-Sem)