r260514 - in /trunk/gcc/ada: ChangeLog sem_prag...
pmderodat@gcc.gnu.org
pmderodat@gcc.gnu.org
Tue May 22 13:22:00 GMT 2018
Author: pmderodat
Date: Tue May 22 13:22:06 2018
New Revision: 260514
URL: https://gcc.gnu.org/viewcvs?rev=260514&root=gcc&view=rev
Log:
[Ada] Crash on pragma Compile_Time_Warning with declared string constant
This patch fixes a compiler abort on a pragma Compile_Time_Warning when its
second argument is a reference to a constsant string (rather than a string
literal or an expression that evaluates to a string literal).
Compiling msain.adb must yield:
main.adb:5:33: warning: Good
main.adb:6:33: warning: VALLUE
main.adb:7:33: warning: Test
----
procedure Main is
Value : constant String := "Test";
Switch : constant Boolean := True;
begin
pragma Compile_Time_Warning (Switch, "Good");
pragma Compile_Time_Warning (Switch, "VAL" & "LUE");
pragma Compile_Time_Warning (Switch, value);
null;
end Main;
2018-05-22 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Handle properly
a second argument that is a constant of a given string value.
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/sem_prag.adb
More information about the Gcc-cvs
mailing list