This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libstdc++/10167: ieee_1003.1-[3.2/3.3/3.4 regression] 2001 locale specialisations on a RedHat8.0/glibc-2.3.2-4 system


>Number:         10167
>Category:       libstdc++
>Synopsis:       ieee_1003.1-[3.2/3.3/3.4 regression] 2001 locale specialisations on a RedHat8.0/glibc-2.3.2-4 system
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 20 14:56:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Andrew Pollard
>Release:        gcc-3.2.3-20030320-cvs
>Organization:
>Environment:
Redhat8.0/Glibc-2.3.2-4
>Description:
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.
>How-To-Repeat:

>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
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]