[PATCH] D15432: [libcxx] Move member function definition before it's explicit template instantiation declaration in <valarray> to satisfy GCC.

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 10 13:11:06 PST 2015


EricWF created this revision.
EricWF added reviewers: mclow.lists, rsmith, eugenis.
EricWF added subscribers: cfe-commits, rsmith.

GCC fail's to compile a number of <valarray> tests because three valarray member functions cannot be inlined at various points throughout the header. This is an error because these functions are marked __always_inline__. Moving the definition of these member functions to directly before the extern template declaration solves the problem.

An example failure can be found here: http://ds2.efcs.ca:8080/builders/gcc-builder/builds/36/steps/test.libcxx-cxx11/logs/FAIL%3A%20libc%2B%2B%3A%3Amultiply.pass.cpp

@rsmith Would you be able to weigh in here. I'm concerned that we might be in "ill formed: no diagnostic required" territory.  Do you think GCC's behavior is reasonable?





http://reviews.llvm.org/D15432

Files:
  include/valarray

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15432.42391.patch
Type: text/x-patch
Size: 3191 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151210/d3953e02/attachment.bin>


More information about the cfe-commits mailing list