[Bug c++/7748] Static objects in dynamic library with non-default priority not initialized
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Dec 25 02:36:47 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7748
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
First problem looks like:
S.C:16:50: error: attributes after parenthesized initializer ignored
[-fpermissive]
16 | S s2 (65534) __attribute__((init_priority(65534)));
| ^
S.C:17:46: error: attributes after parenthesized initializer ignored
[-fpermissive]
17 | S s3 (101) __attribute__((init_priority(101)));
| ^
Makefile:5: recipe for target 'libS.so' failed
Where the comment in the source is:
/* The old parser allows attributes to appear after a parenthesized
initializer. Mark Mitchell proposed removing this functionality
on the GCC mailing lists on 2002-08-13. This parser accepts the
attributes -- but ignores them. Made a permerror in GCC 8. */
Let me swap around the order to see if that fixes the issue.
More information about the Gcc-bugs
mailing list