aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-loop-distribution.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2021-04-06 01:21:05 -0400
committerJason Merrill <jason@redhat.com>2021-04-06 14:30:02 -0400
commit8685348075d91945066dea9b564bd42cbc1d22bd (patch)
tree56467e80370055dbe45e4b1f27a20924727617c0 /gcc/tree-loop-distribution.c
parentd48f87d5c1927b1bf2009af3251fe8757e823713 (diff)
downloadgcc-8685348075d91945066dea9b564bd42cbc1d22bd.zip
gcc-8685348075d91945066dea9b564bd42cbc1d22bd.tar.gz
gcc-8685348075d91945066dea9b564bd42cbc1d22bd.tar.bz2
c++: C++17 constexpr static data member linkage [PR99901]
C++17 makes constexpr static data members implicitly inline variables. In C++14, a subsequent out-of-class declaration is the definition. We want to continue emitting a symbol for such a declaration in C++17 mode, for ABI compatibility with C++14 code that wants to refer to it. Normally I'd distinguish in- and out-of-class declarations by looking at DECL_IN_AGGR_P, but we never set DECL_IN_AGGR_P on inline variables. I think that's wrong, but don't want to mess with it so close to release. Conveniently, we already have a test for in-class declaration earlier in the function. gcc/cp/ChangeLog: PR c++/99901 * decl.c (cp_finish_decl): mark_needed an implicitly inline static data member with an out-of-class redeclaration. gcc/testsuite/ChangeLog: PR c++/99901 * g++.dg/cpp1z/inline-var9.C: New test.
Diffstat (limited to 'gcc/tree-loop-distribution.c')
0 files changed, 0 insertions, 0 deletions