aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/doc
diff options
context:
space:
mode:
authorGhjuvan Lacambre <lacambre@adacore.com>2020-04-20 09:41:08 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2020-06-18 05:08:24 -0400
commit78689aa295f9b0e54807462d13d3125a5a83c64b (patch)
tree70f7c01b42926dbd73c20404cad0d85b5bded9dc /gcc/ada/doc
parent668fb87d746afb36e22e48972fe379deb3a2184a (diff)
downloadgcc-78689aa295f9b0e54807462d13d3125a5a83c64b.zip
gcc-78689aa295f9b0e54807462d13d3125a5a83c64b.tar.gz
gcc-78689aa295f9b0e54807462d13d3125a5a83c64b.tar.bz2
[Ada] Do not treat pragma Compile_Time_Warning as error even with -gnatwe
2020-06-18 Ghjuvan Lacambre <lacambre@adacore.com> gcc/ada/ * erroutc.ads: Declare new Is_Compile_Time_Msg boolean, add new Compile_Time_Pragma field to Error_Msg_Object type. (Count_Compile_Time_Pragma_Warnings): New function. * erroutc.adb (Count_Compile_Time_Pragma_Warnings): New function. (Compilation_Errors): Take Compile_Time warnings into account when tallying Errors/Warnings. * errout.ads (Error_Msg): New procedure. * errout.adb (Error_Msg): New procedure. (Error_Msg_Internal): Set new Compile_Time_Pragma field in Error_Msg_Object. * errutil.adb (Error_Msg): Set new Compile_Time_Pragma field in Error_Msg_Object. * sem_prag.adb (Validate_Compile_Time_Warning_Or_Error): Pass True to new Error_Msg procedure. * doc/gnat_rm/implementation_defined_pragmas.rst: Update doc for the Compile_Time_Warning pragma. * gnat_rm.texi: Regenerate. * opt.ads: Update comment.
Diffstat (limited to 'gcc/ada/doc')
-rw-r--r--gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
index e5ef967..d100b22 100644
--- a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
@@ -926,6 +926,8 @@ support is available, then the code generator will issue a message
indicating that the necessary attribute for implementation of this
pragma is not available.
+.. _Compile_Time_Error:
+
Pragma Compile_Time_Error
=========================
@@ -979,6 +981,11 @@ of formal parameters are tested, and warnings given appropriately. Another use
with a first parameter of True is to warn a client about use of a package,
for example that it is not fully implemented.
+In previous versions of the compiler, combining *-gnatwe* with
+Compile_Time_Warning resulted in an fatal error. Now the compiler will always
+emit a warning. You can use :ref:`Compile_Time_Error` to force the generation
+of an error.
+
Pragma Compiler_Unit
====================