From: charlet Date: Thu, 9 Sep 2010 13:08:01 +0000 (+0000) Subject: 2010-09-09 Yannick Moy X-Git-Tag: upstream/4.9.2~26733 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5806b6dce7ca7851e212210f91535a5f0bd05326;p=platform%2Fupstream%2Flinaro-gcc.git 2010-09-09 Yannick Moy * a-cihama.adb, a-cohama.adb: Fix comments. 2010-09-09 Arnaud Charlet * i-cexten.ads: Add comments. (Signed_128): New type, used by some C bindings. * debug.adb: Update comment. 2010-09-09 Sergey Rybin * gnat_ugn.texi: For ASIS tools (gnatpp, gnatcheck, gnatelim, gnatmetric and gnatstub) add a note that '-gnat05' should be used if the tool should process Ada 2005 sources. 2010-09-09 Ed Schonberg * sem_ch12.adb (Remove_Parent): If the scope containing the child instance is a block, examine the enclosing scope to determine if it is a parent instance. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164089 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index ef94a4e..8cc6557 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,25 @@ +2010-09-09 Yannick Moy + + * a-cihama.adb, a-cohama.adb: Fix comments. + +2010-09-09 Arnaud Charlet + + * i-cexten.ads: Add comments. + (Signed_128): New type, used by some C bindings. + * debug.adb: Update comment. + +2010-09-09 Sergey Rybin + + * gnat_ugn.texi: For ASIS tools (gnatpp, gnatcheck, gnatelim, + gnatmetric and gnatstub) add a note that '-gnat05' should be used if + the tool should process Ada 2005 sources. + +2010-09-09 Ed Schonberg + + * sem_ch12.adb (Remove_Parent): If the scope containing the child + instance is a block, examine the enclosing scope to determine if it is + a parent instance. + 2010-09-09 Doug Rupp * sem_prag.adb (pragma Ident): Pass --identification= vice diff --git a/gcc/ada/a-cihama.adb b/gcc/ada/a-cihama.adb index 0ec53df..e2e961b 100644 --- a/gcc/ada/a-cihama.adb +++ b/gcc/ada/a-cihama.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -1031,7 +1031,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is return False; end if; - if X = X.Next then -- to prevent endless loop + if X = X.Next then -- to prevent unnecessary looping return False; end if; diff --git a/gcc/ada/a-cohama.adb b/gcc/ada/a-cohama.adb index 9c8877f..fb86bef 100644 --- a/gcc/ada/a-cohama.adb +++ b/gcc/ada/a-cohama.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -908,7 +908,7 @@ package body Ada.Containers.Hashed_Maps is return False; end if; - if X = X.Next then -- to prevent endless loop + if X = X.Next then -- to prevent unnecessary looping return False; end if; diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb index b7f750d..5b4f245 100644 --- a/gcc/ada/debug.adb +++ b/gcc/ada/debug.adb @@ -581,8 +581,7 @@ package body Debug is -- d.T Force Optimize_Alignment (Time) mode as the default -- d.W Print out debugging information for Walk_Library_Items, including - -- the order in which units are walked. This is primarily for SofCheck - -- Inspector. + -- the order in which units are walked. This is primarily for CodePeer -- d.X By default, the compiler uses an elaborate rewriting framework for -- short-circuited forms where the right hand condition generates diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 6a0a18d..e7fbbf6 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -10755,7 +10755,9 @@ the file name may contain path information. @command{gcc}. They will be passed on to all compiler invocations made by @command{gnatelim} to generate the ASIS trees. Here you can provide @option{^-I^/INCLUDE_DIRS=^} switches to form the source search path, -use the @option{-gnatec} switch to set the configuration file etc. +use the @option{-gnatec} switch to set the configuration file, +use the @option{-gnat05} switch if sources should be compiled in +Ada 2005 mode etc. @code{gnatelim} has the following switches: @@ -12652,7 +12654,9 @@ follow the GNAT file naming rules @command{gcc}. They will be passed on to all compiler invocations made by @command{gnatelim} to generate the ASIS trees. Here you can provide @option{^-I^/INCLUDE_DIRS=^} switches to form the source search path, -use the @option{-gnatec} switch to set the configuration file etc. +use the @option{-gnatec} switch to set the configuration file, +use the @option{-gnat05} switch if sources should be compiled in +Ada 2005 mode etc. @end itemize @menu @@ -13766,7 +13770,9 @@ Including both a @option{-files} switch and one or more @command{gcc}. They will be passed on to all compiler invocations made by @command{gnatmetric} to generate the ASIS trees. Here you can provide @option{^-I^/INCLUDE_DIRS=^} switches to form the source search path, -and use the @option{-gnatec} switch to set the configuration file. +and use the @option{-gnatec} switch to set the configuration file, +use the @option{-gnat05} switch if sources should be compiled in +Ada 2005 mode etc. @end itemize @menu @@ -17151,7 +17157,9 @@ or line breaks. @command{gcc}. They will be passed on to all compiler invocations made by @command{gnatcheck} to generate the ASIS trees. Here you can provide @option{^-I^/INCLUDE_DIRS=^} switches to form the source search path, -and use the @option{-gnatec} switch to set the configuration file. +and use the @option{-gnatec} switch to set the configuration file, +use the @option{-gnat05} switch if sources should be compiled in +Ada 2005 mode etc. @item @var{rule_options} is a list of options for controlling a set of @@ -17816,7 +17824,9 @@ current directory) @command{gcc}. They will be passed on to all compiler invocations made by @command{gnatelim} to generate the ASIS trees. Here you can provide @option{^-I^/INCLUDE_DIRS=^} switches to form the source search path, -use the @option{-gnatec} switch to set the configuration file etc. +use the @option{-gnatec} switch to set the configuration file, +use the @option{-gnat05} switch if sources should be compiled in +Ada 2005 mode etc. @item switches is an optional sequence of switches as described in the next section diff --git a/gcc/ada/i-cexten.ads b/gcc/ada/i-cexten.ads index 93f8dc6..c2dd33b 100644 --- a/gcc/ada/i-cexten.ads +++ b/gcc/ada/i-cexten.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2009, 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- -- @@ -36,17 +36,23 @@ with System; package Interfaces.C.Extensions is - -- Following 7 declarations need comments ??? + -- Definitions for C "void" and "void*" types subtype void is System.Address; subtype void_ptr is System.Address; + -- Definitions for C incomplete/unknown structs + subtype opaque_structure_def is System.Address; type opaque_structure_def_ptr is access opaque_structure_def; + -- Definitions for C++ incomplete/unknown classes + subtype incomplete_class_def is System.Address; type incomplete_class_def_ptr is access incomplete_class_def; + -- C bool + subtype bool is plain_char; -- 64bit integer types @@ -54,6 +60,15 @@ package Interfaces.C.Extensions is subtype long_long is Long_Long_Integer; type unsigned_long_long is mod 2 ** 64; + -- 128bit integer type available on 64bit platforms: + -- typedef int signed_128 __attribute__ ((mode (TI))); + + type Signed_128 is record + low, high : unsigned_long_long; + end record; + pragma Convention (C_Pass_By_Copy, Signed_128); + for Signed_128'Alignment use unsigned_long_long'Alignment * 2; + -- Types for bitfields type Unsigned_1 is mod 2 ** 1; diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index 8eb0cd2..4145967 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -11212,6 +11212,7 @@ package body Sem_Ch12 is -- stack contains the parent instances of the instantiation, followed by -- the original S. + Cur_P : Entity_Id; E : Entity_Id; P : Entity_Id; Hidden : Elmt_Id; @@ -11234,9 +11235,17 @@ package body Sem_Ch12 is Next_Entity (E); end loop; - if Is_Generic_Instance (Current_Scope) - and then P /= Current_Scope - then + -- If instantiation is declared in a block, it is the enclosing + -- scope that might be a parent instance. Note that only one + -- block can be involved, because the parent instances have + -- been installed within it. + + Cur_P := P; + if Ekind (P) = E_Block then + Cur_P := Scope (Cur_P); + end if; + + if Is_Generic_Instance (Cur_P) and then P /= Current_Scope then -- We are within an instance of some sibling. Retain -- visibility of parent, for proper subsequent cleanup, and -- reinstall private declarations as well. @@ -11246,7 +11255,7 @@ package body Sem_Ch12 is end if; -- If the ultimate parent is a top-level unit recorded in - -- Instance_Parent_Unit, then reset its visibility to what is was + -- Instance_Parent_Unit, then reset its visibility to what it was -- before instantiation. (It's not clear what the purpose is of -- testing whether Scope (P) is In_Open_Scopes, but that test was -- present before the ultimate parent test was added.???) @@ -11389,11 +11398,11 @@ package body Sem_Ch12 is while Present (M) loop Typ := Node (M); - -- Subtypes of types whose views have been exchanged, and that - -- are defined within the instance, were not on the list of - -- Private_Dependents on entry to the instance, so they have to be - -- exchanged explicitly now, in order to remain consistent with the - -- view of the parent type. + -- Subtypes of types whose views have been exchanged, and that are + -- defined within the instance, were not on the Private_Dependents + -- list on entry to the instance, so they have to be exchanged + -- explicitly now, in order to remain consistent with the view of the + -- parent type. if Ekind_In (Typ, E_Private_Type, E_Limited_Private_Type, @@ -11437,11 +11446,11 @@ package body Sem_Ch12 is -- An unusual case of aliasing: the actual may also be directly -- visible in the generic, and be private there, while it is fully -- visible in the context of the instance. The internal subtype - -- is private in the instance, but has full visibility like its + -- is private in the instance but has full visibility like its -- parent in the enclosing scope. This enforces the invariant that -- the privacy status of all private dependents of a type coincide -- with that of the parent type. This can only happen when a - -- generic child unit is instantiated within sibling. + -- generic child unit is instantiated within a sibling. if Is_Private_Type (E) and then not Is_Private_Type (Etype (E)) @@ -11457,16 +11466,14 @@ package body Sem_Ch12 is -- a formal package, make its own formals private as well. The -- actual in this case is itself the renaming of an instantiation. -- If the entity is not a package renaming, it is the entity - -- created to validate formal package actuals: ignore. + -- created to validate formal package actuals: ignore it. -- If the actual is itself a formal package for the enclosing -- generic, or the actual for such a formal package, it remains -- visible on exit from the instance, and therefore nothing needs -- to be done either, except to keep it accessible. - if Is_Package - and then Renamed_Object (E) = Pack_Id - then + if Is_Package and then Renamed_Object (E) = Pack_Id then exit; elsif Nkind (Parent (E)) /= N_Package_Renaming_Declaration then