diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-10-13 12:12:18 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-10-13 12:12:18 +0000 |
commit | 76a6b7c73135cc897f5ebce2590a51468eff912b (patch) | |
tree | 58bad2ff2cb86b921572595ff8d1a1dd40b814d5 /gcc/ada/gnat1drv.adb | |
parent | 229b6af0b687aca91a796e664ca092fe23ae5ac1 (diff) | |
download | gcc-76a6b7c73135cc897f5ebce2590a51468eff912b.tar.gz |
2016-10-13 Javier Miranda <miranda@adacore.com>
* sem_prag.ads (Process_Compile_Time_Warning_Or_Error): New
overloaded subprogram that factorizes code executed as part
of the regular processing of these pragmas and as part of its
validation after invoking the backend.
* sem_prag.adb (Process_Compile_Time_Warning_Or_Error): New
subprogram.
(Process_Compile_Time_Warning_Or_Error): If the
condition is known at compile time then invoke the new overloaded
subprogram; otherwise register the pragma in a table to validate
it after invoking the backend.
* sem.ads, sem.adb (Unlock): New subprogram.
* sem_attr.adb (Analyze_Attribute [Size]): If we are processing
pragmas Compile_Time_Warning and Compile_Time_Errors after the
backend has been called then evaluate this attribute if 'Size
is known at compile time.
* gnat1drv.adb (Post_Compilation_Validation_Checks): Validate
compile time warnings and errors.
* sem_ch13.ads, sem_ch13.adb (Validate_Compile_Time_Warning_Error):
New subprogram.
(Validate_Compile_Time_Warning_Errors): New subprogram.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241107 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gnat1drv.adb')
-rw-r--r-- | gcc/ada/gnat1drv.adb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb index fa08414652c..929bfcc316d 100644 --- a/gcc/ada/gnat1drv.adb +++ b/gcc/ada/gnat1drv.adb @@ -871,6 +871,18 @@ procedure Gnat1drv is Checks.Validate_Alignment_Check_Warnings; + -- Validate compile time warnings and errors (using the values for size + -- and alignment annotated by the backend where possible). We need to + -- unlock temporarily these tables to reanalyze their expression. + + Atree.Unlock; + Nlists.Unlock; + Sem.Unlock; + Sem_Ch13.Validate_Compile_Time_Warning_Errors; + Sem.Lock; + Nlists.Lock; + Atree.Lock; + -- Validate unchecked conversions (using the values for size and -- alignment annotated by the backend where possible). |