Bug 3004 – [patch] Better handling of ignored pragmas

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2009-05-17T14:48:18Z
Last change time
2023-12-31T22:35:09Z
Keywords
patch, pull
Assigned to
Walter Bright
Creator
Frits van Bommel

Attachments

IDFilenameSummaryContent-TypeSize
374ignored-pragmas.patchPatch to fix these issues.text/plain829

Comments

Comment #0 by fvbommel — 2009-05-17T14:48:18Z
Created attachment 374 Patch to fix these issues. DMD offers the -ignore switch to ignore unrecognized pragmas. However, this still has some issues: * An error is still generated when the pragma has a body (instead of just ignoring the pragma attribute and using the body). * If any of the pragma parameters aren't semantically valid, an error is generated if -v is specified on the command line. (e.g. if an undefined identifier is used) The following should compile with -ignore (and -ignore -v): ----- module test; extern(C) int printf(char*, ...); pragma(GNU_attribute, flatten) void test() { printf("Hello GNU world!\n"); } void main() { test(); } ----- (And also if the pragma line has a ';' appended)
Comment #1 by dlang-bot — 2019-09-27T09:34:03Z
@RazvanN7 created dlang/dmd pull request #10443 "Fix Issue 3004 - Better handling of ignored pragmas" fixing this issue: - Fix Issue 3004 - Better handling of ignored pragmas https://github.com/dlang/dmd/pull/10443
Comment #2 by dlang-bot — 2019-10-01T08:28:15Z
dlang/dmd pull request #10443 "Fix Issue 3004 - Better handling of ignored pragmas" was merged into master: - 75422bee6aa0bc0179a4d162b4c239162c30a576 by RazvanN7: Fix Issue 3004 - Better handling of ignored pragmas https://github.com/dlang/dmd/pull/10443
Comment #3 by ibuclaw — 2023-12-31T22:35:09Z
*** Issue 19109 has been marked as a duplicate of this issue. ***