https://bugs.llvm.org/show_bug.cgi?id=37117

            Bug ID: 37117
           Summary: -Wunreachable-code warning not issued when a macro is
                    used
           Product: clang
           Version: 6.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

Reported by Martin Galvin on cfe-dev:

This code triggers the warning:

int main()
{
    return 0;

    int a = 42;
}

while this doesn't:

#define A 42

int main()
{
    return 0;

    int a = A;
}


This happens on clang++-6.0. I'm not using any options other than
-Wunreachable-code

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to