From 1a14bfbd78324a25943998ed1e877e41ec4cd417 Mon Sep 17 00:00:00 2001 From: Yannick Moy Date: Wed, 11 Dec 2019 10:21:57 +0100 Subject: [Ada] Change pragma Compile_Time_Error to force compile-time evaluation 2020-05-25 Yannick Moy gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst: Document changes to pragmas Compile_Time_Error/Compile_Time_Warning. * gnat_rm.texi: Regenerate. * libgnat/g-bytswa.adb: Change uses of Compile_Time_Error to Compile_Time_Warning, as the actual expression may not always be known statically. * sem_prag.adb (Analyze_Pragma): Handle differently pragma Compile_Time_Error in both compilation and in GNATprove mode. (Validate_Compile_Time_Warning_Or_Error): Issue an error or warning when the expression is not known at compile time. * usage.adb: Add missing documentation for warning switches _c and _r. * warnsw.ads: Update comment. --- gcc/ada/usage.adb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/ada/usage.adb') diff --git a/gcc/ada/usage.adb b/gcc/ada/usage.adb index fb261e5..0d1e168 100644 --- a/gcc/ada/usage.adb +++ b/gcc/ada/usage.adb @@ -495,6 +495,10 @@ begin Write_Line (" C* turn off warnings for constant conditional"); Write_Line (" .c+ turn on warnings for unrepped components"); Write_Line (" .C* turn off warnings for unrepped components"); + Write_Line (" _c* turn on warnings for unknown " & + "Compile_Time_Warning"); + Write_Line (" _C turn off warnings for unknown " & + "Compile_Time_Warning"); Write_Line (" d turn on warnings for implicit dereference"); Write_Line (" D* turn off warnings for implicit dereference"); Write_Line (" .d turn on tagging of warnings with -gnatw switch"); @@ -571,6 +575,8 @@ begin Write_Line (" R* turn off warnings for redundant construct"); Write_Line (" .r+ turn on warnings for object renaming function"); Write_Line (" .R* turn off warnings for object renaming function"); + Write_Line (" _r turn on warnings for components out of order"); + Write_Line (" _R turn off warnings for components out of order"); Write_Line (" s suppress all info/warnings"); Write_Line (" .s turn on warnings for overridden size clause"); Write_Line (" .S* turn off warnings for overridden size clause"); -- cgit v1.1