зеркало из https://github.com/microsoft/clang-1.git
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 :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69556 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
78eb874222
Коммит
4d8aac3778
|
@ -214,6 +214,10 @@ def ext_stdc_pragma_syntax :
|
|||
def ext_stdc_pragma_syntax_eom :
|
||||
ExtWarn<"expected end of macro in STDC pragma">,
|
||||
InGroup<UnknownPragmas>;
|
||||
def warn_stdc_fenv_access_not_supported :
|
||||
ExtWarn<"pragma STDC FENV_ACCESS ON is not supported, ignoring pragma">,
|
||||
InGroup<UnknownPragmas>;
|
||||
|
||||
def err_pragma_comment_unknown_kind : Error<"unknown kind of pragma comment">;
|
||||
def err_defined_macro_name : Error<"'defined' cannot be used as a macro name">;
|
||||
def err_paste_at_start : Error<
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#pragma STDC FP_CONTRACT DEFAULT
|
||||
#pragma STDC FP_CONTRACT IN_BETWEEN // expected-warning {{expected 'ON' or 'OFF' or 'DEFAULT' in pragma}}
|
||||
|
||||
#pragma STDC FENV_ACCESS ON
|
||||
#pragma STDC FENV_ACCESS ON // expected-warning {{pragma STDC FENV_ACCESS ON is not supported, ignoring pragma}}
|
||||
#pragma STDC FENV_ACCESS OFF
|
||||
#pragma STDC FENV_ACCESS DEFAULT
|
||||
#pragma STDC FENV_ACCESS IN_BETWEEN // expected-warning {{expected 'ON' or 'OFF' or 'DEFAULT' in pragma}}
|
||||
|
|
Загрузка…
Ссылка в новой задаче