aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/net/URLClassLoader.java
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2022-11-06 11:09:26 -0500
committerPatrick Palka <ppalka@redhat.com>2022-11-06 11:09:26 -0500
commitd0a492faa6478c99d325fa4a7ed2e5633cef7529 (patch)
tree733fcf33b077d090c956b85e6d13a6307bc1aebe /libjava/java/net/URLClassLoader.java
parent89d0a14a1fdf89d38d9db1156ffde8c1b276823c (diff)
downloadgcc-d0a492faa6478c99d325fa4a7ed2e5633cef7529.zip
gcc-d0a492faa6478c99d325fa4a7ed2e5633cef7529.tar.gz
gcc-d0a492faa6478c99d325fa4a7ed2e5633cef7529.tar.bz2
c++: correct __has_attribute(init_priority)
Currently __has_attribute(init_priority) always returns true, even on targets that don't actually support init priorities, and when using the attribute on such targets we just get a hard error about them being unsupported. This makes it impossible to conditionally use the attribute by querying __has_attribute. This patch fixes this by including init_priority in the attribute table only if the target supports init priorities. Thus on such targets __has_attribute(init_priority) will now return false and we'll treat it as just another unrecognized attribute (e.g. using it gives a -Wattribute warning instead of a hard error). gcc/cp/ChangeLog: * tree.cc (cxx_attribute_table): Include init_priority entry only if SUPPORTS_INIT_PRIORITY. (handle_init_priority_attribute): Add ATTRIBUTE_UNUSED. Assert SUPPORTS_INIT_PRIORITY is true. gcc/testsuite/ChangeLog: * g++.dg/special/initpri3.C: New test.
Diffstat (limited to 'libjava/java/net/URLClassLoader.java')
0 files changed, 0 insertions, 0 deletions