aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-09-02 12:10:35 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-09-02 12:10:35 +0200
commitbd38b43159413df75de165990b82bc32ae677e07 (patch)
tree3d2e6d96e6901ec268fe78be655e2c8a0744ab63 /gcc
parent99d520ade527dcb82b6f3057ea571caaeb00c2b7 (diff)
downloadgcc-bd38b43159413df75de165990b82bc32ae677e07.zip
gcc-bd38b43159413df75de165990b82bc32ae677e07.tar.gz
gcc-bd38b43159413df75de165990b82bc32ae677e07.tar.bz2
[multiple changes]
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog11
-rw-r--r--gcc/ada/gcc-interface/Make-lang.in70
-rw-r--r--gcc/ada/sem_ch3.adb11
-rw-r--r--gcc/ada/sem_ch4.adb9
-rw-r--r--gcc/ada/sem_ch6.adb15
5 files changed, 67 insertions, 49 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 52c8f1c..ebf6ca9 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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,
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index 2d97a44..826bdcc 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -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 \
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 372f7d2..3e5665f 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -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
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index e539a56..5f404f3 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -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;
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index bd1b6e3..88c226b 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -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;