public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/106823] New: #pragma GCC diagnostic ignored "-Wattribute-warning" doesn't work for -flto
@ 2022-09-04  2:47 jiangning.liu at amperecomputing dot com
  2022-09-05 10:20 ` [Bug middle-end/106823] " rguenth at gcc dot gnu.org
  2022-10-21 21:26 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: jiangning.liu at amperecomputing dot com @ 2022-09-04  2:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106823

            Bug ID: 106823
           Summary: #pragma GCC diagnostic ignored "-Wattribute-warning"
                    doesn't work for -flto
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jiangning.liu at amperecomputing dot com
  Target Milestone: ---

$ cat foo.cpp
extern "C" __attribute__((__warning__("xxxx"))) void _foo(int) {};

void foo(int num) {
#pragma GCC diagnostic ignored "-Wattribute-warning"
  ::_foo(num);
}

int main()
{
    foo(1);
}
$ g++ foo.cpp
$ g++ -flto foo.cpp
foo.cpp: In function ‘foo’:
foo.cpp:5:9: warning: call to ‘_foo’ declared with attribute warning: xxxx
[-Wattribute-warning]
    5 |   ::_foo(num);
      |         ^

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug middle-end/106823] #pragma GCC diagnostic ignored "-Wattribute-warning" doesn't work for -flto
  2022-09-04  2:47 [Bug c/106823] New: #pragma GCC diagnostic ignored "-Wattribute-warning" doesn't work for -flto jiangning.liu at amperecomputing dot com
@ 2022-09-05 10:20 ` rguenth at gcc dot gnu.org
  2022-10-21 21:26 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-09-05 10:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106823

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think we have a duplicate for this report.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug middle-end/106823] #pragma GCC diagnostic ignored "-Wattribute-warning" doesn't work for -flto
  2022-09-04  2:47 [Bug c/106823] New: #pragma GCC diagnostic ignored "-Wattribute-warning" doesn't work for -flto jiangning.liu at amperecomputing dot com
  2022-09-05 10:20 ` [Bug middle-end/106823] " rguenth at gcc dot gnu.org
@ 2022-10-21 21:26 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-10-21 21:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106823

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
      Known to fail|                            |12.1.0, 9.1.0
   Last reconfirmed|                            |2022-10-21

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-21 21:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-04  2:47 [Bug c/106823] New: #pragma GCC diagnostic ignored "-Wattribute-warning" doesn't work for -flto jiangning.liu at amperecomputing dot com
2022-09-05 10:20 ` [Bug middle-end/106823] " rguenth at gcc dot gnu.org
2022-10-21 21:26 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).