* sem_attr.adb: Minor reformatting.
2010-09-09 Thomas Quinot <quinot@adacore.com>
* socket.c (__gnat_socket_ioctl): On Darwin, the req parameter is an
unsigned long, not an int.
2010-09-09 Vincent Celier <celier@adacore.com>
* make.adb, mlib-prj.adb, prj.adb, prj-nmsc.adb, mlib-tgt.adb,
prj-conf.adb, prj-env.adb: Use Display_Name instead of Name whenever
we are not checking for equality of path or file names.
2010-09-09 Ed Schonberg <schonberg@adacore.com>
* exp_util.adb (Remove_Side_Effects): If the expression is a packed
array reference, reset the Analyzed flag so that it is properly
expanded when the resulting object declaration is analyzed.
2010-09-09 Vincent Celier <celier@adacore.com>
* sinput-p.adb (Source_File_Is_Subunit): Return False if X is
No_Source_File.
2010-09-09 Ramon Fernandez <fernandez@adacore.com>
* sysdep.c: The wrSbc8548 BSP in MILS doesn't know anything about the
VX_SPE_TASK option, so disable it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164084
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-09-09 Robert Dewar <dewar@adacore.com>
+
+ * sem_attr.adb: Minor reformatting.
+
+2010-09-09 Thomas Quinot <quinot@adacore.com>
+
+ * socket.c (__gnat_socket_ioctl): On Darwin, the req parameter is an
+ unsigned long, not an int.
+
+2010-09-09 Vincent Celier <celier@adacore.com>
+
+ * make.adb, mlib-prj.adb, prj.adb, prj-nmsc.adb, mlib-tgt.adb,
+ prj-conf.adb, prj-env.adb: Use Display_Name instead of Name whenever
+ we are not checking for equality of path or file names.
+
+2010-09-09 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_util.adb (Remove_Side_Effects): If the expression is a packed
+ array reference, reset the Analyzed flag so that it is properly
+ expanded when the resulting object declaration is analyzed.
+
+2010-09-09 Vincent Celier <celier@adacore.com>
+
+ * sinput-p.adb (Source_File_Is_Subunit): Return False if X is
+ No_Source_File.
+
+2010-09-09 Ramon Fernandez <fernandez@adacore.com>
+
+ * sysdep.c: The wrSbc8548 BSP in MILS doesn't know anything about the
+ VX_SPE_TASK option, so disable it.
+
2010-09-09 Ed Schonberg <schonberg@adacore.com>
* sem.adb (Walk_Library_Items): Traverse context of subunits of the
Set_Etype (Def_Id, Exp_Type);
Res := New_Reference_To (Def_Id, Loc);
+ -- If the expression is a packed reference, it must be reanalyzed
+ -- and expanded, depending on context. This is the case for actuals
+ -- where a constraint check may capture the actual before expansion
+ -- of the call is complete.
+
+ if Nkind (Exp) = N_Indexed_Component
+ and then Is_Packed (Etype (Prefix (Exp)))
+ then
+ Set_Analyzed (Exp, False);
+ Set_Analyzed (Prefix (Exp), False);
+ end if;
+
E :=
Make_Object_Declaration (Loc,
Defining_Identifier => Def_Id,
when Directory_Error =>
Make_Failed ("unable to change to object directory """ &
Path_Or_File_Name
- (Project.Object_Directory.Name) &
+ (Project.Object_Directory.Display_Name) &
""" of project " &
Get_Name_String (Project.Display_Name));
end Change_To_Object_Directory;
New_Args : Argument_List (1 .. Number);
Last_New : Natural := 0;
Dir_Path : constant String := Get_Name_String
- (Arguments_Project.Directory.Name);
+ (Arguments_Project.Directory.Display_Name);
begin
Current := Switches.Values;
(Name_Buffer (1 .. Name_Len)));
Dir_Path : constant String :=
Get_Name_String
- (Arguments_Project.Directory.Name);
+ (Arguments_Project.
+ Directory.Display_Name);
begin
Test_If_Relative_Path
then
Get_Name_String
(Project_Of_Current_Object_Directory
- .Object_Directory.Name);
+ .Object_Directory.Display_Name);
Add_Str_To_Name_Buffer
(Get_Name_String (Lib_File));
Full_Lib_File := Name_Find;
Get_Name_String (ALI_Project.Library_Dir.Name);
else
Get_Name_String
- (ALI_Project.Object_Directory.Name);
+ (ALI_Project.Object_Directory.Display_Name);
end if;
if not
begin
if not Is_Absolute_Path (Exec_File_Name) then
- Get_Name_String (Main_Project.Exec_Directory.Name);
+ Get_Name_String
+ (Main_Project.Exec_Directory.Display_Name);
if not
Is_Directory_Separator (Name_Buffer (Name_Len))
declare
Dir_Path : constant String :=
- Get_Name_String (Main_Project.Directory.Name);
+ Get_Name_String (Main_Project.Directory.Display_Name);
begin
for J in 1 .. Binder_Switches.Last loop
Test_If_Relative_Path
declare
Dir_Path : constant String :=
Get_Name_String
- (Main_Project.Directory.Name);
+ (Main_Project.Directory.Display_Name);
begin
for
begin
Src_Ind := Sinput.P.Load_Project_File
(Get_Name_String
- (Unit.File_Names (Impl).Path.Name));
+ (Unit.File_Names (Impl).Path.Display_Name));
-- If it is a subunit, discard it
(Object_Dir_Path
& Directory_Separator
& Filename (1 .. Last));
+ Object_File : constant String :=
+ Filename (1 .. Last);
- C_Object_Path : String := Object_Path;
- C_Filename : String := Filename (1 .. Last);
+ C_Filename : String := Object_File;
begin
- Canonical_Case_File_Name (C_Object_Path);
Canonical_Case_File_Name (C_Filename);
-- If in the object directory of an extended
or else
C_Filename (1 .. B_Start'Length) /= B_Start.all
then
- Name_Len := Last;
- Name_Buffer (1 .. Name_Len) :=
- C_Filename (1 .. Last);
+ Name_Len := 0;
+ Add_Str_To_Name_Buffer (C_Filename);
Id := Name_Find;
if not Objects_Htable.Get (Id) then
declare
ALI_File : constant String :=
- Ext_To
- (C_Filename
- (1 .. Last), "ali");
+ Ext_To (C_Filename, "ali");
ALI_Path : constant String :=
- Ext_To (C_Object_Path, "ali");
+ Ext_To (Object_Path, "ali");
Add_It : Boolean;
Fname : File_Name_Type;
-- the library file and any ALI file of a source of the project.
begin
- Get_Name_String (For_Project.Library_Dir.Name);
+ Get_Name_String (For_Project.Library_Dir.Display_Name);
Change_Dir (Name_Buffer (1 .. Name_Len));
exception
Copy_ALI_Files
(Files => Ali_Files.all,
- To => For_Project.Library_ALI_Dir.Name,
+ To => For_Project.Library_ALI_Dir.Display_Name,
Interfaces => Arguments (1 .. Argument_Number));
-- Copy interface sources if Library_Src_Dir specified
-- could be a source of the project.
begin
- Get_Name_String (For_Project.Library_Src_Dir.Name);
+ Get_Name_String (For_Project.Library_Src_Dir.Display_Name);
Change_Dir (Name_Buffer (1 .. Name_Len));
exception
Lib_Name : constant File_Name_Type :=
Library_File_Name_For (For_Project, In_Tree);
begin
- Change_Dir (Get_Name_String (For_Project.Library_Dir.Name));
+ Change_Dir
+ (Get_Name_String (For_Project.Library_Dir.Display_Name));
Lib_TS := File_Stamp (Lib_Name);
For_Project.Library_TS := Lib_TS;
end;
-- be Empty_Time_Stamp, earlier than any other time stamp.
Change_Dir
- (Get_Name_String (For_Project.Object_Directory.Name));
+ (Get_Name_String (For_Project.Object_Directory.Display_Name));
Open (Dir => Object_Dir, Dir_Name => ".");
-- For all entries in the object directory
begin
-- Change the working directory to the object directory
- Change_Dir (Get_Name_String (For_Project.Object_Directory.Name));
+ Change_Dir (Get_Name_String (For_Project.Object_Directory.Display_Name));
for Index in Interfaces'Range loop
-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2009, AdaCore --
+-- Copyright (C) 2001-2010, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
else
declare
Lib_Dir : constant String :=
- Get_Name_String (Project.Library_Dir.Name);
+ Get_Name_String (Project.Library_Dir.Display_Name);
Lib_Name : constant String :=
Get_Name_String (Project.Library_Name);
-- First, find the object directory of the user's project
if Obj_Dir = Nil_Variable_Value or else Obj_Dir.Default then
- Get_Name_String (Project.Directory.Name);
+ Get_Name_String (Project.Directory.Display_Name);
else
if Is_Absolute_Path (Get_Name_String (Obj_Dir.Value)) then
else
Name_Len := 0;
Add_Str_To_Name_Buffer
- (Get_Name_String (Project.Directory.Name));
+ (Get_Name_String (Project.Directory.Display_Name));
Add_Str_To_Name_Buffer (Get_Name_String (Obj_Dir.Value));
end if;
end if;
Fmap.Add_To_File_Map
(Unit_Name => Unit_Name_Type (Data.Unit.Name),
File_Name => Data.File,
- Path_Name => File_Name_Type (Data.Path.Name));
+ Path_Name => File_Name_Type (Data.Path.Display_Name));
end if;
end if;
Put_Name_Buffer;
end if;
- Get_Name_String (Source.File);
+ Get_Name_String (Source.Display_File);
Put_Name_Buffer;
if Source.Locally_Removed then
Name_Len := 1;
Name_Buffer (1) := '/';
else
- Get_Name_String (Source.Path.Name);
+ Get_Name_String (Source.Path.Display_Name);
end if;
Put_Name_Buffer;
and then Name_Loc.Source.Kind = Impl
then
Src_Ind := Sinput.P.Load_Project_File
- (Get_Name_String (Path));
+ (Get_Name_String (Display_Path));
if Sinput.P.Source_File_Is_Subunit (Src_Ind) then
Override_Kind (Name_Loc.Source, Sep);
Src_Ind :=
Sinput.P.Load_Project_File
- (Get_Name_String (Src_Id.Path.Name));
+ (Get_Name_String (Src_Id.Path.Display_Name));
if Sinput.P.Source_File_Is_Subunit (Src_Ind) then
Override_Kind (Src_Id, Sep);
if Project.Library then
if Project.Object_Directory = No_Path_Information
- or else Contains_ALI_Files (Project.Library_ALI_Dir.Name)
+ or else Contains_ALI_Files (Project.Library_ALI_Dir.Display_Name)
then
- return Project.Library_ALI_Dir.Name;
+ return Project.Library_ALI_Dir.Display_Name;
else
- return Project.Object_Directory.Name;
+ return Project.Object_Directory.Display_Name;
end if;
-- For a non-library project, add object directory if it is not a
-- didn't permit the access to be declared in the generic
-- spec, whereas the revised rule does (as long as it's not
-- a formal type).
- -- Note that we relax this check in CodePeer mode for
- -- compatibility with legacy code.
-- There are a couple of subtleties of the test for applying
-- the check that are worth noting. First, we only apply it
-- when within an instance, because any violations will have
-- been caught by the compilation of the generic unit.
+ -- Note that we relax this check in CodePeer mode for
+ -- compatibility with legacy code.
+
+ -- This seems an odd decision??? Why should codepeer mode
+ -- have a different notion of legality from the compiler???
+
elsif Attr_Id = Attribute_Access
and then not CodePeer_Mode
and then not In_Instance
-- The attribute type's ultimate ancestor must be
-- declared within the same generic unit as the
-- subprogram is declared. The error message is
- -- specialized to say "ancestor" for the case where
- -- the access type is not its own ancestor, since
- -- saying simply "access type" would be very confusing.
+ -- specialized to say "ancestor" for the case where the
+ -- access type is not its own ancestor, since saying
+ -- simply "access type" would be very confusing.
if Enclosing_Generic_Unit (Entity (P)) /=
Enclosing_Generic_Unit (Root_Type (Btyp))
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
function Source_File_Is_Subunit (X : Source_File_Index) return Boolean is
begin
+ -- Nothing to do if X is null. So, simply return False.
+
+ if X = No_Source_File then
+ return False;
+ end if;
+
Prj.Err.Scanner.Initialize_Scanner (X);
-- No error for special characters that are used for preprocessing
* *
* C Implementation File *
* *
- * Copyright (C) 2003-2009, Free Software Foundation, Inc. *
+ * Copyright (C) 2003-2010, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
__gnat_socket_ioctl (int fd, int req, int *arg) {
#if defined (_WIN32)
return ioctlsocket (fd, req, arg);
+#elif defined (__APPLE__)
+ /*
+ * On Darwin, req is an unsigned long, and we want to convert without sign
+ * extension to get the proper bit pattern in the case of a 64 bit kernel.
+ */
+ return ioctl (fd, (unsigned int) req, arg);
#else
return ioctl (fd, req, arg);
#endif
/* Force VX_FP_TASK because it is almost always required */
options |= VX_FP_TASK;
-#if defined (__SPE__)
+#if defined (__SPE__) && (! defined (__VXWORKSMILS__))
options |= VX_SPE_TASK;
#endif