From: Arnaud Charlet Date: Wed, 7 Jan 2015 10:01:36 +0000 (+0100) Subject: [multiple changes] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b6e5a1ec2c33cd98e0f3ca4818993a3a00ef05eb;p=gcc.git [multiple changes] 2015-01-07 Vincent Celier * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete. * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete. 2015-01-07 Vincent Celier * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize errors/warnings in the first parsing of the project files, to display the warnings when there is no errors. 2015-01-07 Tristan Gingold * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target. 2015-01-07 Doug Rupp * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return value from Int_Lock as parameter to Int_Unlock. * s-osinte-vxworks.ads (Int_Unlock): Add parameter. * s-vxwext.ads (Int_Unlock): Likewise. * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise. * s-vxwext-kernel.ads (Int_Unlock): Likewise. * s-vxwext-rtp.adb (Int_Unlock): Likewise. * s-vxwext-rtp.ads (Int_Unlock): Likewise. 2015-01-07 Pierre-Marie de Rodat * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we keep ___XP suffixes From-SVN: r219288 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 3fb4b233c8c..c0e8fc2fc2b 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,34 @@ +2015-01-07 Vincent Celier + + * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete. + * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete. + +2015-01-07 Vincent Celier + + * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize + errors/warnings in the first parsing of the project files, + to display the warnings when there is no errors. + +2015-01-07 Tristan Gingold + + * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target. + +2015-01-07 Doug Rupp + + * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return + value from Int_Lock as parameter to Int_Unlock. + * s-osinte-vxworks.ads (Int_Unlock): Add parameter. + * s-vxwext.ads (Int_Unlock): Likewise. + * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise. + * s-vxwext-kernel.ads (Int_Unlock): Likewise. + * s-vxwext-rtp.adb (Int_Unlock): Likewise. + * s-vxwext-rtp.ads (Int_Unlock): Likewise. + +2015-01-07 Pierre-Marie de Rodat + + * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we + keep ___XP suffixes + 2015-01-07 Tristan Gingold * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to diff --git a/gcc/ada/clean.adb b/gcc/ada/clean.adb index 999c735fe12..5d892e32d73 100644 --- a/gcc/ada/clean.adb +++ b/gcc/ada/clean.adb @@ -1383,6 +1383,14 @@ package body Clean is if Project_File_Name /= null then + -- Warn about 'gnatclean -P' + + if Project_File_Name /= null then + Put_Line + ("warning: gnatclean -P is obsolete and will not be available " & + "in the next release. Use gprclean instead."); + end if; + -- A project file was specified by a -P switch if Opt.Verbose_Mode then diff --git a/gcc/ada/exp_pakd.adb b/gcc/ada/exp_pakd.adb index e6bcb999869..cd592dc3529 100644 --- a/gcc/ada/exp_pakd.adb +++ b/gcc/ada/exp_pakd.adb @@ -763,6 +763,12 @@ package body Exp_Pakd is -- a subtype that is equivalent to use Packed_Bytes{1,2,4} as needed. elsif not Is_Constrained (Typ) then + + -- When generating standard DWARF, the ___XP suffix will be stripped + -- by the back-end, but generate it anyway to ease compiler + -- debugging: this will help to distinguish implementation types from + -- original packed arrays. + PAT := Make_Defining_Identifier (Loc, Chars => Make_Packed_Array_Impl_Type_Name (Typ, Csize)); diff --git a/gcc/ada/i-cpoint.adb b/gcc/ada/i-cpoint.adb index 6b3c84d2293..39c7bef72a2 100644 --- a/gcc/ada/i-cpoint.adb +++ b/gcc/ada/i-cpoint.adb @@ -146,7 +146,7 @@ package body Interfaces.C.Pointers is L : ptrdiff_t; S : Pointer := Source; begin - if Source = null then + if Source = null or Target = null then raise Dereference_Error; end if; diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb index eb062e38ce9..8bbe0949955 100644 --- a/gcc/ada/make.adb +++ b/gcc/ada/make.adb @@ -6486,6 +6486,14 @@ package body Make is Make_Failed ("-i and -D cannot be used simultaneously"); end if; + -- Warn about 'gnatmake -P' + + if Project_File_Name /= null then + Write_Line + ("warning: gnatmake -P is obsolete and will not be available " & + "in the next release. Use gprbuild instead."); + end if; + -- If --subdirs= is specified, but not -P, this is equivalent to -D, -- except that the directory is created if it does not exist. diff --git a/gcc/ada/prj-conf.adb b/gcc/ada/prj-conf.adb index a3b92f8e230..9c83902d3e1 100644 --- a/gcc/ada/prj-conf.adb +++ b/gcc/ada/prj-conf.adb @@ -1604,6 +1604,8 @@ package body Prj.Conf is Target_Try_Again : Boolean := True; Config_Try_Again : Boolean; + Finalization : Prj.Part.Errout_Mode := Prj.Part.Always_Finalize; + S : State := No_State; Conf_File_Name : String_Access := new String'(Config_File_Name); @@ -1663,13 +1665,15 @@ package body Prj.Conf is (In_Tree => Project_Node_Tree, Project => User_Project_Node, Project_File_Name => Project_File_Name, - Errout_Handling => Prj.Part.Finalize_If_Error, + Errout_Handling => Finalization, Packages_To_Check => Packages_To_Check, Current_Directory => Current_Directory, Is_Config_File => False, Env => Env, Implicit_Project => Implicit_Project); + Finalization := Prj.Part.Finalize_If_Error; + if User_Project_Node = Empty_Node then return; end if; diff --git a/gcc/ada/s-osinte-vxworks.ads b/gcc/ada/s-osinte-vxworks.ads index 0193284330d..777c381f5a8 100644 --- a/gcc/ada/s-osinte-vxworks.ads +++ b/gcc/ada/s-osinte-vxworks.ads @@ -227,9 +227,11 @@ package System.OS_Interface is -- If we are in the kernel space, lock interrupts. It typically maps to -- intLock. - function Int_Unlock return int renames System.VxWorks.Ext.Int_Unlock; + function Int_Unlock (Old : int) return int + renames System.VxWorks.Ext.Int_Unlock; -- If we are in the kernel space, unlock interrupts. It typically maps to - -- intUnlock. + -- intUnlock. The parameter Old is only used on PowerPC where it contains + -- the returned value from Int_Lock (the old MPSR). ---------- -- Time -- diff --git a/gcc/ada/s-taprop-vxworks.adb b/gcc/ada/s-taprop-vxworks.adb index 7b5871ae479..7aff4a66d6e 100644 --- a/gcc/ada/s-taprop-vxworks.adb +++ b/gcc/ada/s-taprop-vxworks.adb @@ -1299,9 +1299,10 @@ package body System.Task_Primitives.Operations is C : Task_Id; Dummy : int; + Old : int; begin - Dummy := Int_Lock; + Old := Int_Lock; C := All_Tasks_List; while C /= null loop @@ -1314,7 +1315,7 @@ package body System.Task_Primitives.Operations is C := C.Common.All_Tasks_Link; end loop; - Dummy := Int_Unlock; + Dummy := Int_Unlock (Old); end Stop_All_Tasks; --------------- diff --git a/gcc/ada/s-vxwext-kernel.adb b/gcc/ada/s-vxwext-kernel.adb index cd2ac264266..584de4f7323 100644 --- a/gcc/ada/s-vxwext-kernel.adb +++ b/gcc/ada/s-vxwext-kernel.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2008-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2014, Free Software Foundation, Inc. -- -- -- -- GNARL 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- -- @@ -49,10 +49,10 @@ package body System.VxWorks.Ext is -- Int_Unlock -- ---------------- - function intUnlock return int; + function intUnlock (Old : int) return int; pragma Import (C, intUnlock, "intUnlock"); - function Int_Unlock return int renames intUnlock; + function Int_Unlock (Old : int) return int renames intUnlock; --------------- -- semDelete -- diff --git a/gcc/ada/s-vxwext-kernel.ads b/gcc/ada/s-vxwext-kernel.ads index ff41666fbed..c8cba655cec 100644 --- a/gcc/ada/s-vxwext-kernel.ads +++ b/gcc/ada/s-vxwext-kernel.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2008-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2014, Free Software Foundation, Inc. -- -- -- -- GNARL 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- -- @@ -53,7 +53,7 @@ package System.VxWorks.Ext is function Int_Lock return int; pragma Convention (C, Int_Lock); - function Int_Unlock return int; + function Int_Unlock (Old : int) return int; pragma Convention (C, Int_Unlock); function Interrupt_Connect diff --git a/gcc/ada/s-vxwext-rtp.adb b/gcc/ada/s-vxwext-rtp.adb index e5f74062ca2..4dd7ab46c95 100644 --- a/gcc/ada/s-vxwext-rtp.adb +++ b/gcc/ada/s-vxwext-rtp.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2008-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2014, Free Software Foundation, Inc. -- -- -- -- GNARL 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- -- @@ -48,7 +48,8 @@ package body System.VxWorks.Ext is -- Int_Unlock -- ---------------- - function Int_Unlock return int is + function Int_Unlock (Old : int) return int is + pragma Unreferenced (Old); begin return ERROR; end Int_Unlock; diff --git a/gcc/ada/s-vxwext-rtp.ads b/gcc/ada/s-vxwext-rtp.ads index ed734578c0b..4b658f69434 100644 --- a/gcc/ada/s-vxwext-rtp.ads +++ b/gcc/ada/s-vxwext-rtp.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2008-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2014, Free Software Foundation, Inc. -- -- -- -- GNARL 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- -- @@ -53,7 +53,7 @@ package System.VxWorks.Ext is function Int_Lock return int; pragma Inline (Int_Lock); - function Int_Unlock return int; + function Int_Unlock (Old : int) return int; pragma Inline (Int_Unlock); function Interrupt_Connect diff --git a/gcc/ada/s-vxwext.ads b/gcc/ada/s-vxwext.ads index 6e7cd16331a..1aea52739e3 100644 --- a/gcc/ada/s-vxwext.ads +++ b/gcc/ada/s-vxwext.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2008-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2014, Free Software Foundation, Inc. -- -- -- -- GNARL 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- -- @@ -54,7 +54,7 @@ package System.VxWorks.Ext is function Int_Lock return int; pragma Import (C, Int_Lock, "intLock"); - function Int_Unlock return int; + function Int_Unlock (Old : int) return int; pragma Import (C, Int_Unlock, "intUnlock"); function Interrupt_Connect