[llvm-bugs] [Bug 52130] New: #pragma diagnostic push/pop docs out of date re GCC

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Oct 10 14:57:11 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=52130

            Bug ID: 52130
           Summary: #pragma diagnostic push/pop docs out of date re GCC
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Documentation
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ojwbetts at gmail.com
                CC: llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

The clang docs at
https://clang.llvm.org/docs/UsersManual.html#controlling-diagnostics-via-pragmas
currently say:

> In addition to all of the functionality provided by GCC’s pragma, Clang also allows you to push and pop the current warning state.

And:

> That means that it is possible to use push and pop around GCC compatible diagnostics and Clang will push and pop them appropriately, while GCC will ignore the pushes and pops as unknown pragmas.

This is out-of-date as GCC has implemented `#pragma GCC diagnostic push` and
`#pragma GCC diagnostic pop` since 4.6.0 (which was released over 10 years
ago):

https://gcc.gnu.org/onlinedocs/gcc-4.6.0/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211010/8e6d9c63/attachment.html>


More information about the llvm-bugs mailing list