Not treating 'pragma Compile_Time_Warning' warnings as errors even with the -gnatwe switch makes sense because if users desire errors, they can use the Compile_Time_Error pragma.
Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-18 Ghjuvan Lacambre <lacam...@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.
patch.diff.gz
Description: application/gzip