diff options
author | Gary Dismukes <dismukes@adacore.com> | 2022-04-05 20:20:10 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-05-18 08:41:06 +0000 |
commit | 72de114c23027f1d1f0df4c78e69c4302e39e058 (patch) | |
tree | c5c1ffd439a5e669ba8b3f8b1ec1f54d3618e501 /gcc/tree-chrec.h | |
parent | b271095d5076f837391b2726c1265ae2e91fafa8 (diff) | |
download | gcc-72de114c23027f1d1f0df4c78e69c4302e39e058.zip gcc-72de114c23027f1d1f0df4c78e69c4302e39e058.tar.gz gcc-72de114c23027f1d1f0df4c78e69c4302e39e058.tar.bz2 |
[Ada] Improve error messages for occurrence of GNAT extensions without -gnatX
The error message issued for use of GNAT extension features without
specifying -gnatX (or pragma Extensions_Allowed) was confusing in the
presence of a pragma specifying a language version (such as "pragma
Ada_2022;"), because the pragma supersedes the switch. The message is
improved by testing for use of such a pragma, plus use of pragma
Extensions_Allowed is now suggested, and several cases are changed to
call the common error procedure for flagging uses of extension features.
gcc/ada/
* errout.ads (Error_Msg_GNAT_Extension): Add formal Loc and
revise comment.
* errout.adb (Error_Msg_GNAT_Extension): Condition message on
the flag Ada_Version_Pragma, and add suggestion to use of pragma
Extensions_Allowed in messages.
* par-ch3.adb, par-ch5.adb, par-ch6.adb, par-ch11.adb,
par-ch12.adb: Add actual Token_Ptr on calls to
Error_Msg_GNAT_Extension.
* par-ch4.adb: Change Error_Msg to Error_Msg_GNAT_Extension for
error calls related to use of extension features.
* sem_ch13.adb: Likewise.
Diffstat (limited to 'gcc/tree-chrec.h')
0 files changed, 0 insertions, 0 deletions