[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
Lang Hames
lhames at gmail.com
Wed Oct 24 11:01:30 PDT 2012
Hi Tim,
Yes - this is definitely overly conservative. I'll fix it up.
Thanks for catching this.
- Lang.
On Wed, Oct 24, 2012 at 4:28 AM, Tim Northover <t.p.northover at gmail.com>wrote:
> 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.
>
> Tim.
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121024/4f6d2850/attachment.html>
More information about the cfe-commits
mailing list