diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-10-13 18:14:16 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-10-13 18:14:16 +0200 |
commit | 409274f15563bfb31e55ca2a731b6d7bd3ea2f77 (patch) | |
tree | 35bfadb0cd5037724210821a16d48343aaed728c | |
parent | 2e151b6dbc8a63a5720ee6685702f1ecf535ef1f (diff) | |
download | gcc-409274f15563bfb31e55ca2a731b6d7bd3ea2f77.zip gcc-409274f15563bfb31e55ca2a731b6d7bd3ea2f77.tar.gz gcc-409274f15563bfb31e55ca2a731b6d7bd3ea2f77.tar.bz2 |
[multiple changes]
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
-rw-r--r-- | gcc/ada/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/ada/gnat_ugn.texi | 1 | ||||
-rw-r--r-- | gcc/ada/sem_ch3.adb | 11 |
3 files changed, 23 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index cdd30eb..347f311 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -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. diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 2b50495..122534c 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -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. diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 0d3cd0f..8410409 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -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; |