This is GCC Bugzilla
This is GCC Bugzilla Version 2.20+
View Bug Activity | Format For Printing | Clone This Bug
I have just upgraded my RedHat Linux 8.0 system to the latest Redhat glibc (2.3.2-4), and I've spotted a problem with libstdc++-v3/include/bits/codecvt.h and libstdc++-v3config/locale/ieee_1003.1-2001/codecvt_specializations.h I assume that the switch to glibc-2.3.2-4 has enabled this specialisation. I have not seen the problem prior today. codecvt.cxx: -------------------------------------------- namespace error {} #include <ios> -------------------------------------------- % g++32 -c codecvt.cxx .... /usr/local/gcc-3.2.3-20030320-i686-pc-linux-gnu/include/c++/3.2.3/i686-pc-linux-gnu/bits/codecvt_specializations.h:424: use of namespace `error' as expression Basically, bits/codecvt.h has an 'enum result' in codecvt_base which is used as a return result from a lot of the methods in __codecvt_abstract_base. The uses within ieee_1003.1-2001/codecvt_specializations.h are not fully qualified, so gcc-3.2.3-20030320 gets confused about using a namespace as an expression. Similarly for the 'ok', 'partial' and 'noconv' enum values. I assume gcc-3.3 and gcc-3.4 will have the same problem since they have the same enum. Release: gcc-3.2.3-20030320-cvs Environment: Redhat8.0/Glibc-2.3.2-4
Fix: Qualify the uses of the codecvt_base::result 'ok', 'partial', 'error', 'noconv' enums in the ieee_1003.1-2001/codecvt_specializations.h file either codecvt_base::error, or this->error seem to work. Alternatively, uglify the enum values, eg __error, __ok, etc, since the __ things are reserved for the implementation
State-Changed-From-To: open->analyzed State-Changed-Why: Cannot possibly affect 3.4, due to this commit: 2003-02-06 Petur Runolfsson <peturr02@ru.is> DR 75 DR 305 PR libstdc++/9028 (partial) PR libstdc++/9224 PR libstdc++/9246 PR libstdc++/9247 Benjamin, at this point in the release cycle of 3.3 we had better only fully qualifying (error as codecvt_base::error, etc.), instead of fully backporting Pétur's rewrote, I think. Do you agree? Thanks, Paolo.
From: Benjamin Kosnik <bkoz@redhat.com> To: paolo@gcc.gnu.org, Andrew.Pollard@brooks.com, bkoz@redhat.com, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Cc: paolo@gcc.gnu.org, Andrew.Pollard@brooks.com, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org Subject: Re: libstdc++/10167: ieee_1003.1-[3.2/3.3 regression] 2001 locale specialisations on a RedHat8.0/glibc-2.3.2-4 system Date: Thu, 20 Mar 2003 20:50:18 -0600 > Benjamin, at this point in the release cycle of 3.3 we > had better only fully qualifying (error as=20 > codecvt_base::error, etc.), instead of fully backporting > P=E9tur's rewrote, I think. Do you agree? > Thanks, Paolo. Yes, just make sure it passes make check-abi. thanks! benjamin
From: paolo@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: libstdc++/10167 Date: 21 Mar 2003 11:44:45 -0000 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: paolo@gcc.gnu.org 2003-03-21 11:44:45 Modified files: libstdc++-v3 : ChangeLog libstdc++-v3/config/locale/ieee_1003.1-2001: codecvt_specializations.h Log message: 2003-03-21 Paolo Carlini <pcarlini@unitus.it> PR libstdc++/10167 * config/locale/ieee_1003.1-2001/codecvt_specializations.h (do_out, do_unshift, do_in): qualify 'ok', 'error', 'partial', 'noconv' with codecvt_base::. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.1464.2.68&r2=1.1464.2.69 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/locale/ieee_1003.1-2001/codecvt_specializations.h.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.4&r2=1.4.20.1
State-Changed-From-To: analyzed->closed State-Changed-Why: Fixed for 3.3.
From: Andrew Pollard <Andrew.Pollard@brooks.com> To: paolo@gcc.gnu.org, Andrew.Pollard@brooks.com, bkoz@redhat.com, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Cc: Subject: Re: libstdc++/10167: ieee_1003.1-[3.2/3.3 regression] 2001 locale specialisations on a RedHat8.0/glibc-2.3.2-4 system Date: Fri, 21 Mar 2003 16:33:09 +0000 paolo@gcc.gnu.org wrote: > Synopsis: ieee_1003.1-[3.2/3.3 regression] 2001 locale specialisations on a RedHat8.0/glibc-2.3.2-4 system > > State-Changed-From-To: analyzed->closed > State-Changed-By: paolo > State-Changed-When: Fri Mar 21 16:08:14 2003 > State-Changed-Why: > Fixed for 3.3. > > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10167 > Any chance of getting this into 3.2.3 ? Seems a very simple change. Andrew. -- Andrew Pollard - Senior Software Engineer (APF) Brooks Automation - Planning & Logistics Solutions Email: Andrew.Pollard@brooks.com - Tel: +44 (0)118 9215603
From: paolo@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: libstdc++/10167 Date: 26 Mar 2003 12:25:46 -0000 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_2-branch Changes by: paolo@gcc.gnu.org 2003-03-26 12:25:46 Modified files: libstdc++-v3 : ChangeLog libstdc++-v3/config/locale/ieee_1003.1-2001: codecvt_specializations.h Log message: 2003-03-26 Paolo Carlini <pcarlini@unitus.it> PR libstdc++/10167 * config/locale/ieee_1003.1-2001/codecvt_specializations.h (do_out, do_unshift, do_in): qualify 'ok', 'error', 'partial', 'noconv' with codecvt_base::. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.1057.2.159.2.87&r2=1.1057.2.159.2.88 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/locale/ieee_1003.1-2001/codecvt_specializations.h.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.1.2.4&r2=1.1.2.4.2.1
From: Paolo Carlini <pcarlini@unitus.it> To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, Andrew.Pollard@brooks.com, nobody@gcc.gnu.org, gcc-prs@gcc.gnu.org Cc: Subject: Re: libstdc++/10167: ieee_1003.1-[3.2/3.3 regression] 2001 locale specialisations on a RedHat8.0/glibc-2.3.2-4 system Date: Wed, 26 Mar 2003 13:27:22 +0100 Fixed for 3.2.3 too. Paolo. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10167