On Mon, Nov 26, 2007 at 04:02:48PM -0500, Stephane Hockenhull wrote: > On Monday 26 November 2007 14:01, Daniel Jacobowitz wrote: > > On Mon, Nov 26, 2007 at 10:40:35AM -0800, Joe Buck wrote: > > > On Mon, Nov 26, 2007 at 01:33:54PM -0500, Stephane Hockenhull wrote: > > > > hi, it seem stl templates are not mangled as other classes and > > > > templates > > > > > > > > I was wondering why and where in the g++ source code is that special > > > > case implemented? > > > > > > > > it seem to cause a problem with -fleading-underscore > > > > > > AFAIK there is no special case, however there might be a bug lurking > > > somewhere. Do you have a specific case where -fleading-underscore messes > > > up? > > > > There are a few special cases, e.g. for std::string and > > std::basic_string; the C++ ABI documents have the details. > > > > _ZSi -> std::basic_istream<char, std::char_traits<char> > > > those cause problem with -fleading-underscore. > > it seem there is more than one data path for the mangling and one of those > misses adding the extra underscore which cause missing symbols at linking.
Hm. But -fleading-underscore is there to support an old ABI, the one that BSD Unix used to use, and the _ZSi is for the newer common ABI. Probably no one tested the interaction, so I don't know what the correct solution is. But why are you using -fleading-underscore?