diff options
author | Javier Miranda <miranda@adacore.com> | 2016-10-13 12:12:18 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-10-13 14:12:18 +0200 |
commit | a946a5c38d46ae99653649aafadf8f020defaa5d (patch) | |
tree | 58bad2ff2cb86b921572595ff8d1a1dd40b814d5 /gcc/ada/sem_ch13.ads | |
parent | c877ae8dc867e29552b5ab4b2367479829b4de69 (diff) | |
download | gcc-a946a5c38d46ae99653649aafadf8f020defaa5d.zip gcc-a946a5c38d46ae99653649aafadf8f020defaa5d.tar.gz gcc-a946a5c38d46ae99653649aafadf8f020defaa5d.tar.bz2 |
sem_prag.ads (Process_Compile_Time_Warning_Or_Error): New overloaded subprogram that factorizes code executed as part of the regular...
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.
From-SVN: r241107
Diffstat (limited to 'gcc/ada/sem_ch13.ads')
-rw-r--r-- | gcc/ada/sem_ch13.ads | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch13.ads b/gcc/ada/sem_ch13.ads index e3ee211..af056be 100644 --- a/gcc/ada/sem_ch13.ads +++ b/gcc/ada/sem_ch13.ads @@ -188,6 +188,18 @@ package Sem_Ch13 is -- change. A False result is possible only for array, enumeration or -- record types. + procedure Validate_Compile_Time_Warning_Error (N : Node_Id); + -- N is a pragma Compile_Time_Error or Compile_Warning_Error whose boolean + -- expression is not known at compile time. This procedure makes an entry + -- in a table. The actual checking is performed by Validate_Compile_Time_ + -- Warning_Errors which is invoked after calling the backend. + + procedure Validate_Compile_Time_Warning_Errors; + -- This routine is called after calling the backend to validate pragmas + -- Compile_Time_Error and Compile_Time_Warning for size and alignment + -- appropriateness. The reason it is called that late is to take advantage + -- of any back-annotation of size and alignment performed by the backend. + procedure Validate_Unchecked_Conversion (N : Node_Id; Act_Unit : Entity_Id); |