[Bug c/104627] [12 Regression] New failure in deprecated.c

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 28 11:23:39 GMT 2022


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
On e.g.
struct A {};
struct __attribute__((deprecated)) B {};
typedef struct A C __attribute__((deprecated));
void f1 (struct A *);
void f2 (struct B *);
void f3 (C *);
void f4 (const struct A *);
void f5 (const struct B *);
void f6 (const C *);
the r12-7287 change when compiled by C++ differs just with one extra
+aaa.c:2:36: note: declared here
+    2 | struct __attribute__((deprecated)) B {};
+      |                                    ^
which wasn't there before, but in C changes:
-aaa.c:6:1: warning: ‘C’ is deprecated [-Wdeprecated-declarations]
+aaa.c:6:1: warning: ‘A’ is deprecated [-Wdeprecated-declarations]
and
-aaa.c:9:1: warning: ‘C’ is deprecated [-Wdeprecated-declarations]
+aaa.c:9:1: warning: ‘A’ is deprecated [-Wdeprecated-declarations]


More information about the Gcc-bugs mailing list