aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-06-12 12:05:20 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2012-06-12 12:05:20 +0200
commit586ecbf363a2a4209c5bacc0d292f3bf08f784e1 (patch)
tree7b7564af950a782481ed065c77f9cca3e727f568 /gcc
parent70f4ad204d9ef74b9650a1088a5d26d121e4ded8 (diff)
downloadgcc-586ecbf363a2a4209c5bacc0d292f3bf08f784e1.zip
gcc-586ecbf363a2a4209c5bacc0d292f3bf08f784e1.tar.gz
gcc-586ecbf363a2a4209c5bacc0d292f3bf08f784e1.tar.bz2
[multiple changes]
2012-06-12 Robert Dewar <dewar@adacore.com> * sem_ch6.adb: Minor reformatting. 2012-06-12 Eric Botcazou <ebotcazou@adacore.com> * gnat_ugn.texi: Couple of minor corrections. 2012-06-12 Thomas Quinot <quinot@adacore.com> * sem_prag.adb (Check_Variant): An empty component list is not illegal in an unchecked union variant. From-SVN: r188436
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog13
-rw-r--r--gcc/ada/gnat_ugn.texi4
-rw-r--r--gcc/ada/sem_ch6.adb13
-rw-r--r--gcc/ada/sem_prag.adb7
4 files changed, 21 insertions, 16 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index a5a2548..c10eef0 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,16 @@
+2012-06-12 Robert Dewar <dewar@adacore.com>
+
+ * sem_ch6.adb: Minor reformatting.
+
+2012-06-12 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat_ugn.texi: Couple of minor corrections.
+
+2012-06-12 Thomas Quinot <quinot@adacore.com>
+
+ * sem_prag.adb (Check_Variant): An empty component list is not
+ illegal in an unchecked union variant.
+
2012-06-12 Gary Dismukes <dismukes@adacore.com>
* projects.texi: Remove comments.
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 8380530..825c8a4 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -10618,13 +10618,13 @@ Any one of the following applies: @code{pragma Inline} is applied to the
subprogram and the @option{^-gnatn^/INLINE^} switch is specified; the
subprogram is local to the unit and called once from within it; the
subprogram is small and optimization level @option{-O2} is specified;
-optimization level @option{-O3}) is specified.
+optimization level @option{-O3} is specified.
@end itemize
@noindent
Calls to subprograms in @code{with}'ed units are normally not inlined.
To achieve actual inlining (that is, replacement of the call by the code
-in the body of the subprogram), the following conditions must all be true.
+in the body of the subprogram), the following conditions must all be true:
@itemize @bullet
@item
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 80e07fd..c69bf91 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -7416,6 +7416,7 @@ package body Sem_Ch6 is
-- The following is too permissive. A more precise test should
-- check that the generic actual is an ancestor subtype of the
-- other ???.
+
-- See code in Find_Corresponding_Spec that applies an additional
-- filter to handle accidental amiguities in instances.
@@ -8164,19 +8165,17 @@ package body Sem_Ch6 is
begin
if Ekind (E) = E_Function
- and then Is_Generic_Actual_Type (Etype (E))
- /= Is_Generic_Actual_Type (Etype (Designator))
+ and then Is_Generic_Actual_Type (Etype (E)) /=
+ Is_Generic_Actual_Type (Etype (Designator))
then
return True;
end if;
F1 := First_Formal (Designator);
F2 := First_Formal (E);
-
while Present (F1) loop
- if
- Is_Generic_Actual_Type (Etype (F1))
- /= Is_Generic_Actual_Type (Etype (F2))
+ if Is_Generic_Actual_Type (Etype (F1)) /=
+ Is_Generic_Actual_Type (Etype (F2))
then
return True;
end if;
@@ -8202,7 +8201,7 @@ package body Sem_Ch6 is
if Scope (E) = Current_Scope then
if Current_Scope = Standard_Standard
or else (Ekind (E) = Ekind (Designator)
- and then Type_Conformant (E, Designator))
+ and then Type_Conformant (E, Designator))
then
-- Within an instantiation, we know that spec and body are
-- subtype conformant, because they were subtype conformant in
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index fa41b2c..cbcc0be 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -2483,13 +2483,6 @@ package body Sem_Prag is
Comp : Node_Id;
begin
- if not Is_Non_Empty_List (Component_Items (Clist)) then
- Error_Msg_N
- ("Unchecked_Union may not have empty component list",
- Variant);
- return;
- end if;
-
Comp := First (Component_Items (Clist));
while Present (Comp) loop
Check_Component (Comp, UU_Typ, In_Variant_Part => True);