[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Sun, 13 Oct 2013 16:14:16 +0000 (18:14 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Sun, 13 Oct 2013 16:14:16 +0000 (18:14 +0200)
2013-10-13  Vincent Celier  <celier@adacore.com>

* gnat_ugn.texi: Minor editing.

2013-10-13  Ed Schonberg  <schonberg@adacore.com>

* sem_ch3.adb (Check_Abstract_Overriding): If a synchronized
operation implements an interface primitive, mark the operation
as referenced, to prevent usually spurious messages about unused
entities: such operations are called in dispatching select
statements that are not visible to the compiler.

From-SVN: r203501

gcc/ada/ChangeLog
gcc/ada/gnat_ugn.texi
gcc/ada/sem_ch3.adb

index cdd30eb47165f0f421d0a811eea54bad710e3876..347f3112481c65892f3d6c9bfc744f0e36a5be67 100644 (file)
@@ -1,3 +1,15 @@
+2013-10-13  Vincent Celier  <celier@adacore.com>
+
+       * gnat_ugn.texi: Minor editing.
+
+2013-10-13  Ed Schonberg  <schonberg@adacore.com>
+
+       * sem_ch3.adb (Check_Abstract_Overriding): If a synchronized
+       operation implements an interface primitive, mark the operation
+       as referenced, to prevent usually spurious messages about unused
+       entities: such operations are called in dispatching select
+       statements that are not visible to the compiler.
+
 2013-10-13  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/decl.c (gnat_to_gnu_param): Remove obsolete comment.
index 2b5049573109d8e135dcacefca3557a4bd1457c4..122534ce31771c6170f6d009590b5a9ea8e209ce 100644 (file)
@@ -19034,7 +19034,6 @@ by @command{gnatstub} to compile an argument source file.
 @cindex @option{^-gnatyM^/MAX_LINE_LENGTH^} (@command{gnatstub})
 (@var{n} is a non-negative integer). Set the maximum line length that is
 allowed in a source file. The default is 79. The maximum value that can be
-body stub to @var{n}; the default is 79. The maximum value that can be
 specified is 32767. Note that in the special case of configuration
 pragma files, the maximum is always 32767 regardless of whether or
 not this switch appears.
index 0d3cd0f68c8aab1a93a96bacd8053b8eda81add7..8410409737b796a63bf19b95f468cc9695dda921 100644 (file)
@@ -9432,6 +9432,17 @@ package body Sem_Ch3 is
             end if;
          end if;
 
+         --  If the operation is a wrapper for a synchronized primitive, it
+         --  may be called indirectly through a dispatching select. We assume
+         --  that it will be referenced elsewhere indirectly, and suppress
+         --  warnings about an unused entity.
+
+         if Is_Primitive_Wrapper (Subp)
+           and then Present (Wrapped_Entity (Subp))
+         then
+            Set_Referenced (Wrapped_Entity (Subp));
+         end if;
+
          Next_Elmt (Elmt);
       end loop;
    end Check_Abstract_Overriding;