[cfe-commits] [PATCH] Compatibility with GCC 4.6 #pragma GCC diagnostics

Louis Gerbarg lgerbarg at gmail.com
Wed Aug 18 11:30:12 PDT 2010

On Wed, Aug 18, 2010 at 10:34 AM, Douglas Gregor <dgregor at apple.com> wrote:
> On Aug 17, 2010, at 10:43 AM, Louis Gerbarg wrote:
>> GCC 4.6 has apparently added support for #pragma push/pop (see this
>> thread for more details
>> <http://gcc.gnu.org/ml/gcc-patches/2010-06/msg01163.html>), using the
>> exact same identifier and semantics as the existing implementation in
>> clang. This patch removes the special clang mode in the diagnostic
>> handler, which lets the GCC pragmas fall through to the existing code.
>> Overall it is a simplification of the existing code. This patch also
>> includes modified test cases to handle altered semantics of the GCC
>> mode behavior.
> I briefly considered whether we want to think about some kind of version check (e.g., warn if GCC-compatibility-version < 4.6), but going in that direction will drive us insane. So...

I considered it too, but I also concluded that way leads to madness.

> Your patch looks good, but could you submit it again as an attachment instead of inline? It doesn't cleanly apply for me this way (http://llvm.org/docs/DeveloperPolicy.html#patches)

Sorry about that, here is the patch again.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: diags.patch
Type: application/octet-stream
Size: 6276 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20100818/90af89fd/attachment.obj>

More information about the cfe-commits mailing list