diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-19 21:55:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-19 21:55:32 +0000 |
commit | df2226839f653daba49f22649ce6ed77ae9e55e6 (patch) | |
tree | 53ea81902534c2a5c9bf244b1c58ad0349f9d585 /clang/lib/Lex/Pragma.cpp | |
parent | 8ce189f9cefc4afba166c8868bbbfd336d103c28 (diff) | |
download | bcm5719-llvm-df2226839f653daba49f22649ce6ed77ae9e55e6.tar.gz bcm5719-llvm-df2226839f653daba49f22649ce6ed77ae9e55e6.zip |
Warn about uses of #pragma STDC FENV_ACCESS ON, since we don't
support it. I don't know what evaluation method we use for complex
arithmetic, so I don't know whether/if we should warn about use of
CX_LIMITED_RANGE.
This concludes my planned hacking on STDC pragmas, flame away :)
llvm-svn: 69556
Diffstat (limited to 'clang/lib/Lex/Pragma.cpp')
-rw-r--r-- | clang/lib/Lex/Pragma.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp index d30ff3c2897..0dc093fd74d 100644 --- a/clang/lib/Lex/Pragma.cpp +++ b/clang/lib/Lex/Pragma.cpp @@ -560,7 +560,8 @@ struct PragmaSTDC_FP_CONTRACTHandler : public PragmaHandler { struct PragmaSTDC_FENV_ACCESSHandler : public PragmaHandler { PragmaSTDC_FENV_ACCESSHandler(const IdentifierInfo *ID) : PragmaHandler(ID) {} virtual void HandlePragma(Preprocessor &PP, Token &Tok) { - LexOnOffSwitch(PP); + if (LexOnOffSwitch(PP) == STDC_ON) + PP.Diag(Tok, diag::warn_stdc_fenv_access_not_supported); } }; |