Bug 79021 - c++ compiler does not recognize redefinition in the file scope
c++ compiler does not recognize redefinition in the file scope
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2002-12-04 11:52 EST by Need Real Name
Modified: 2007-04-18 12:48 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-03 06:46:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2002-12-04 11:52:00 EST
Description of Problem: This problem is actual for compiler c++ in Red Hat 8.0 
only. Test case works properly( without error) in Red Hat 7.3. Compiler c++  
does not recognize rypedef name redefinition in the file scope.
We have the next text for file test.C:
namespace kr
    typedef long krina;
using kr::krina;

typedef char krina;

Command line:c++ test.C
Compiler does not emits any error. 

If we compile this file with any another c++ language compiler we have the 
error due to redefinition of identifier "krina".  

Version-Release number of selected component (if applicable):
Command line:c++ -v
Compiler emits the next information about version:
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --
infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-
checking --host=i386-redhat-linux --with-system-zlib --enable-__cxa_atexit
Thread model: posix
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)

How Reproducible:

Steps to Reproduce:
1. To make file test.C, as described in report.
2. To execute command line:c++ test.C

Actual Results:

Expected Results:

Additional Information:
Comment 1 Richard Henderson 2004-10-03 06:46:33 EDT
Fails through gcc 3.3; fixed in gcc 3.4.

Note You need to log in before you can comment on or make changes to this bug.