[cfe-dev] Ignoring "-Wc99-extensions" diagnostic warning
Richard Smith
richard at metafoo.co.uk
Sun Aug 17 09:22:59 PDT 2014
Can you provide a reduced test case for this? What is on the line A:V?
On 17 Aug 2014 07:39, "Edward Diener" <eldlistmailingz at tropicsoft.com>
wrote:
> Compiling some code I am receiving the warning:
>
> "warning: empty macro arguments are a C99 feature [-Wc99-extensions]"
>
> The warning is output for file A, line V during a macro invocation.
>
> But the actual macro using an empty argument is in file B, line W. If I
> surround file B, line W with:
>
> # pragma clang diagnostic push
> # pragma clang diagnostic ignored "-Wc99-extensions"
>
> // line W, macro definition with empty macro argument
>
> # pragma clang diagnostic pop
>
> the warning still occurs. Is this a clang bug ?
>
> I have noticed that if I get a warning about using variadic macros (
> "-Wvariadic-macros" ) if I surround the actual variadic macro with:
>
> # pragma clang diagnostic push
> # pragma clang diagnostic ignored "-Wvariadic-macros"
>
> // variadic macro definition
>
> # pragma clang diagnostic pop
>
> the warning goes away.
>
> For various reasons too lengthy to explain, std=c99 or std=c++0x or
> std=c++11 are not specified but I still need to eliminate the
> "-Wc99-extensions" warning in the actual source file.
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140817/8fd8b7d6/attachment.html>
More information about the cfe-dev
mailing list