[committed] libstdc++: Add #error to some files that depend on a specific standard mode

Jonathan Wakely jwakely@redhat.com
Thu Aug 12 16:15:45 GMT 2021


On Thu, 12 Aug 2021 at 15:23, François Dumont wrote:
>
> On 12/08/21 4:04 pm, Jonathan Wakely via Libstdc++ wrote:
> > Give more explicit errors if these files are not built with the correct
> > -std options.
> >
> > libstdc++-v3/ChangeLog:
> >
> >       * src/c++98/locale_init.cc: Require C++11.
> >       * src/c++98/localename.cc: Likewise.
> >       * src/c++98/misc-inst.cc: Require C++98.
> >
> > Tested powerpc64le-linux. Committed to trunk.
> >
> Shouldn't they be moved to src/c++11 ?

Yes, see src/c++98/Makefile.am

# XXX TODO move locale_init.cc and localename.cc to src/c++11
locale_init.lo: locale_init.cc
    $(LTCXXCOMPILE) -std=gnu++11 -fchar8_t -c $<
locale_init.o: locale_init.cc
    $(LTCXXCOMPILE) -std=gnu++11 -fchar8_t -c $<
localename.lo: localename.cc
    $(LTCXXCOMPILE) -std=gnu++11 -fchar8_t -c $<
localename.o: localename.cc
    $(LTCXXCOMPILE) -std=gnu++11 -fchar8_t -c $<


I didn't do that years ago because it would have lost the file history
with subversion. With Git, it should be OK because Git will track the
history across the move. I'll add it to my TODO list.



More information about the Libstdc++ mailing list