Summary: [patch] Better handling of ignored pragmas
           Product: D
           Version: 1.030
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: patch
          Severity: enhancement
          Priority: P2
         Component: DMD

Created an attachment (id=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() {
(And also if the pragma line has a ';' appended)

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to