public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/47818] New: Pragma Assert is rejected with No_Implementation_Pragmas restriction.
@ 2011-02-19 21:09 eugen at debian dot org
2011-09-01 0:41 ` [Bug ada/47818] " nicolas.boulenguez at free dot fr
0 siblings, 1 reply; 2+ messages in thread
From: eugen at debian dot org @ 2011-02-19 21:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47818
Summary: Pragma Assert is rejected with
No_Implementation_Pragmas restriction.
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: eugen@debian.org
Created attachment 23408
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23408
Patch for the bug
Compilation of code containing pragma Assert fails if restriction
No_Implementation_Pragmas is used, even with -gnat2005 or -gnat2012 flags:
% cat test.adb
pragma Restrictions(No_Implementation_Pragmas);
procedure test(I : Integer) is
begin
pragma Assert(I /= 1);
null;
end;
% gcc -c test.adb -gnat2005
test.adb:5:03: violation of restriction "no_implementation_pragmas" at line 1
Source file gcc/ada/sem_prag.adb contains correct check for Pragma_Assert
(Ada_2005_Pragma). But this pragma is then rewritten as pragma Check and
restrictions (GNAT_Pragma) are tested again. This test fails and causes
compilation error.
Attached patch adds check in Pragma_Check case. If rewritten pragma Assert was
found then restrictions are not checked.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug ada/47818] Pragma Assert is rejected with No_Implementation_Pragmas restriction.
2011-02-19 21:09 [Bug ada/47818] New: Pragma Assert is rejected with No_Implementation_Pragmas restriction eugen at debian dot org
@ 2011-09-01 0:41 ` nicolas.boulenguez at free dot fr
0 siblings, 0 replies; 2+ messages in thread
From: nicolas.boulenguez at free dot fr @ 2011-09-01 0:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47818
nicolas.boulenguez at free dot fr changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nicolas.boulenguez at free
| |dot fr
--- Comment #1 from nicolas.boulenguez at free dot fr 2011-09-01 00:41:36 UTC ---
found 4.4.5 (by eugen@debian.org)
found 4.6.1 (by me)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-09-01 0:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-19 21:09 [Bug ada/47818] New: Pragma Assert is rejected with No_Implementation_Pragmas restriction eugen at debian dot org
2011-09-01 0:41 ` [Bug ada/47818] " nicolas.boulenguez at free dot fr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).