[cfe-commits] r166383 - in /cfe/trunk: include/clang/Basic/DiagnosticParseKinds.td lib/Parse/ParseStmt.cpp test/CodeGen/fp-contract-pragma.cpp test/Parser/pragma-fp-contract.c

Tim Northover t.p.northover at gmail.com
Wed Oct 24 04:28:30 PDT 2012

Hi Lang,

I think this check is ever-so-slightly too strict. Currently it
disallows the following code:

void foo(int a) {
    #pragma ms_struct off
    #pragma stdc fp_contract off

because the fp_contract pragma is no longer the first thing in the
compound. However, the standard says it should "precede all explicit
declarations and statements inside a compound statement". And since
pragmas are neither of those, I think the construct should be allowed.


More information about the cfe-commits mailing list