]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Fri, 2 Sep 2011 10:10:35 +0000 (12:10 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 2 Sep 2011 10:10:35 +0000 (12:10 +0200)
2011-09-02  Robert Dewar  <dewar@adacore.com>

* sem_ch4.adb, sem_ch6.adb: Minor reformatting.
* gcc-interface/Make-lang.in: Update dependencies.

2011-09-02  Marc Sango  <sango@adacore.com>

* sem_ch3.adb (Analyze_Object_Declaration): Change
comment and add additional check to differentiate constant of
type string from others unconstrained type.

From-SVN: r178462

gcc/ada/ChangeLog
gcc/ada/gcc-interface/Make-lang.in
gcc/ada/sem_ch3.adb
gcc/ada/sem_ch4.adb
gcc/ada/sem_ch6.adb

index 52c8f1cf2bb909f4282a5a3329bbd017cb577776..ebf6ca9c371c06303652945fe840c9a93d546bec 100644 (file)
@@ -1,3 +1,14 @@
+2011-09-02  Robert Dewar  <dewar@adacore.com>
+
+       * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
+       * gcc-interface/Make-lang.in: Update dependencies.
+
+2011-09-02  Marc Sango  <sango@adacore.com>
+
+       * sem_ch3.adb (Analyze_Object_Declaration): Change
+       comment and add additional check to differentiate constant of
+       type string from others unconstrained type.
+
 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
 
        * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
index 2d97a4417e853cba20ad6bd4778219506a8118b7..826bdcca1c75bc2ab794d877b9d0d399d97df302 100644 (file)
@@ -1506,13 +1506,14 @@ ada/bindgen.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
 
 ada/bindusg.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
    ada/a-uncdea.ads ada/alloc.ads ada/bindusg.ads ada/bindusg.adb \
-   ada/debug.ads ada/hostparm.ads ada/interfac.ads ada/namet.ads \
-   ada/namet.adb ada/opt.ads ada/osint.ads ada/output.ads ada/system.ads \
-   ada/s-exctab.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
-   ada/s-secsta.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \
-   ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
-   ada/table.ads ada/table.adb ada/tree_io.ads ada/types.ads \
-   ada/unchconv.ads ada/unchdeal.ads ada/widechar.ads 
+   ada/debug.ads ada/gnatvsn.ads ada/hostparm.ads ada/interfac.ads \
+   ada/namet.ads ada/namet.adb ada/opt.ads ada/osint.ads ada/output.ads \
+   ada/switch.ads ada/system.ads ada/s-exctab.ads ada/s-memory.ads \
+   ada/s-os_lib.ads ada/s-parame.ads ada/s-secsta.ads ada/s-stalib.ads \
+   ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \
+   ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
+   ada/tree_io.ads ada/types.ads ada/unchconv.ads ada/unchdeal.ads \
+   ada/widechar.ads 
 
 ada/butil.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
    ada/a-uncdea.ads ada/alloc.ads ada/butil.ads ada/butil.adb \
@@ -2562,21 +2563,21 @@ ada/exp_smem.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
 ada/exp_strm.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
    ada/a-uncdea.ads ada/alloc.ads ada/aspects.ads ada/atree.ads \
    ada/atree.adb ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \
-   ada/elists.ads ada/exp_strm.ads ada/exp_strm.adb ada/exp_tss.ads \
-   ada/exp_util.ads ada/get_targ.ads ada/gnat.ads ada/g-htable.ads \
-   ada/hostparm.ads ada/interfac.ads ada/lib.ads ada/namet.ads \
-   ada/namet.adb ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/nmake.adb \
-   ada/opt.ads ada/output.ads ada/restrict.ads ada/rident.ads \
-   ada/rtsfind.ads ada/sem_aux.ads ada/sem_aux.adb ada/sem_util.ads \
-   ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \
-   ada/stringt.ads ada/system.ads ada/s-exctab.ads ada/s-htable.ads \
-   ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
-   ada/s-rident.ads ada/s-secsta.ads ada/s-stalib.ads ada/s-stoele.ads \
-   ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
-   ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tbuild.ads \
-   ada/tbuild.adb ada/tree_io.ads ada/ttypes.ads ada/types.ads \
-   ada/uintp.ads ada/uintp.adb ada/unchconv.ads ada/unchdeal.ads \
-   ada/urealp.ads ada/widechar.ads 
+   ada/elists.ads ada/elists.adb ada/exp_strm.ads ada/exp_strm.adb \
+   ada/exp_tss.ads ada/exp_util.ads ada/get_targ.ads ada/gnat.ads \
+   ada/g-htable.ads ada/hostparm.ads ada/interfac.ads ada/lib.ads \
+   ada/namet.ads ada/namet.adb ada/nlists.ads ada/nlists.adb ada/nmake.ads \
+   ada/nmake.adb ada/opt.ads ada/output.ads ada/restrict.ads \
+   ada/rident.ads ada/rtsfind.ads ada/sem_aux.ads ada/sem_aux.adb \
+   ada/sem_util.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \
+   ada/snames.ads ada/stand.ads ada/stringt.ads ada/system.ads \
+   ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads \
+   ada/s-os_lib.ads ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads \
+   ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \
+   ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
+   ada/table.adb ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads \
+   ada/ttypes.ads ada/types.ads ada/uintp.ads ada/uintp.adb \
+   ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads 
 
 ada/exp_tss.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
    ada/a-uncdea.ads ada/alloc.ads ada/aspects.ads ada/atree.ads \
@@ -2624,18 +2625,19 @@ ada/exp_util.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
    ada/sem_ch8.ads ada/sem_ch9.ads ada/sem_disp.ads ada/sem_eval.ads \
    ada/sem_eval.adb ada/sem_prag.ads ada/sem_res.ads ada/sem_type.ads \
    ada/sem_util.ads ada/sem_util.adb ada/sem_warn.ads ada/sinfo.ads \
-   ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/sprint.ads \
-   ada/stand.ads ada/stringt.ads ada/stringt.adb ada/style.ads \
-   ada/styleg.ads ada/styleg.adb ada/stylesw.ads ada/system.ads \
-   ada/s-carun8.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
-   ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-rident.ads \
-   ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \
-   ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \
-   ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
-   ada/targparm.ads ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads \
-   ada/ttypes.ads ada/types.ads ada/types.adb ada/uintp.ads ada/uintp.adb \
-   ada/uname.ads ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads \
-   ada/urealp.adb ada/validsw.ads ada/widechar.ads 
+   ada/sinfo.adb ada/sinput.ads ada/sinput.adb ada/snames.ads \
+   ada/sprint.ads ada/stand.ads ada/stringt.ads ada/stringt.adb \
+   ada/style.ads ada/styleg.ads ada/styleg.adb ada/stylesw.ads \
+   ada/system.ads ada/s-carun8.ads ada/s-exctab.ads ada/s-htable.ads \
+   ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
+   ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads \
+   ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \
+   ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
+   ada/table.adb ada/targparm.ads ada/tbuild.ads ada/tbuild.adb \
+   ada/tree_io.ads ada/ttypes.ads ada/types.ads ada/types.adb \
+   ada/uintp.ads ada/uintp.adb ada/uname.ads ada/unchconv.ads \
+   ada/unchdeal.ads ada/urealp.ads ada/urealp.adb ada/validsw.ads \
+   ada/widechar.ads 
 
 ada/exp_vfpt.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
    ada/a-uncdea.ads ada/alloc.ads ada/aspects.ads ada/atree.ads \
index 372f7d27ff302582d66960135654c863504c28e2..3e5665f37ce09cbfc3a9b3aa699cb897cedbc979 100644 (file)
@@ -3320,12 +3320,11 @@ package body Sem_Ch3 is
                --  In SPARK, a declaration of unconstrained type is allowed
                --  only for constants of type string.
 
-               --  Why no check for Comes_From_Source here, seems wrong ???
-               --  Where is check to differentiate string case ???
-
-               Check_SPARK_Restriction
-                 ("declaration of object of unconstrained type not allowed",
-                  E);
+               if Nkind (E) = N_String_Literal then
+                  Check_SPARK_Restriction
+                    ("declaration of object of unconstrained type not allowed",
+                     E);
+               end if;
 
                --  Unconstrained variables not allowed in Ada 83 mode
 
index e539a5679f0e2e7d23c0338f28218a8af627873c..5f404f3c45b91f5a3e9a13bff40d0b4e5277da2f 100644 (file)
@@ -4322,7 +4322,8 @@ package body Sem_Ch4 is
             Error_Msg_Node_2 := First_Subtype (Prefix_Type);
             Error_Msg_NE ("no selector& for}", N, Sel);
 
-            --  If prefix is incomplete, dd information.
+            --  If prefix is incomplete, dd information
+            --  What is dd???
 
             if Is_Incomplete_Type (Type_To_Use) then
                declare
@@ -4332,11 +4333,13 @@ package body Sem_Ch4 is
                   if From_With_Type (Scope (Type_To_Use)) then
                      Error_Msg_NE
                        ("\limited view of& has no components", N, Inc);
+
                   else
                      Error_Msg_NE
                        ("\premature usage of incomplete type&", N, Inc);
-                     if
-                       Nkind (Parent (Inc)) = N_Incomplete_Type_Declaration
+
+                     if Nkind (Parent (Inc)) =
+                                          N_Incomplete_Type_Declaration
                      then
                         Set_Premature_Use (Parent (Inc), N);
                      end if;
index bd1b6e34d3b5083ab6d09c0f2380f154a3c22c3f..88c226b19447847dd55e924a58b58dfb8458ec26 100644 (file)
@@ -5550,17 +5550,20 @@ package body Sem_Ch6 is
 
                declare
                   E : constant Entity_Id := Entity (N);
+
                begin
-                  --  ???Quantified expressions get analyzed later, so E can be
-                  --  empty at this point. In this case, we suppress the
+                  --  ???Quantified expressions get analyzed later, so E can
+                  --  be empty at this point. In this case, we suppress the
                   --  warning, just in case E is assignable. It seems better to
                   --  have false negatives than false positives. At some point,
                   --  we should make the warning more accurate, either by
-                  --  analyzing quantified expressions earlier, or moving this
-                  --  processing later.
+                  --  analyzing quantified expressions earlier, or moving
+                  --  this processing later.
 
-                  if No (E) or else
-                    (Is_Entity_Name (N) and then Ekind (E) in Assignable_Kind)
+                  if No (E)
+                    or else
+                      (Is_Entity_Name (N)
+                        and then Ekind (E) in Assignable_Kind)
                   then
                      Found := True;
                   end if;