Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


On 14/11/13 13:25, Eike Rathke wrote:
Hi,

On Thursday, 2013-11-14 11:25:32 +0100, Michael Stahl wrote:

better to use "#pragma GCC diagnostic ignored" which does not have bad
side effects.

So actually the old advice to create a wrapper header for the reason to
disable warnings for an included header is legacy and moot.

yes it is obsolete with current GCC versions.

I assume that "#pragma GCC diagnostic ignored" can be pushed before and
popped after an #include file to affect only that include, similar to
what "#pragma warning(push, 1)" for _MSC_VER does?

yes with "#pragma GCC diagnostic push" / "pop" - requires a check for
HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE since GCC is so behind the times wrt.
warnings this only got added in some 4.x version...

see e.g. NeonTypes.hxx for usage example.


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.