[g++] namespace problem

brent verner brent@rcfile.org
Fri Sep 1 00:22:00 GMT 2000


Hi,

  I'm working on the C compatibility headers for libstdc++-v3
(process detailed: http://www.cantrip.org/cheaders.html ). There appears
to be a buglet floating around somewhere in the compiler system that
(,I believe, wrongly) finds ambiguity with function calls defined
in separate namespaces.

compiling the attached program results in the following:

  brent$ g++ screwy-namespaces.cc -o screwy-namespaces
  screwy-namespaces.cc: In function `int main ()':
  screwy-namespaces.cc:31: call of overloaded `abs (int)' is ambiguous
  <internal>:31: candidates are: int abs (int)
  screwy-namespaces.cc:19:                 int std::abs (int)

Where does the <internal> come from?

Also, I have attached the output from 'g++ -E -dD'

Thanks for your help,
  Brent

-- 
Damon Brent Verner                        o      _     _         _
Cracker Jack® Surprise Certified  _o     /\_   _ \\o  (_)\__/o  (_)
brent@rcfile.org                _< \_   _>(_) (_)/<_    \_| \   _|/' \/
brent@linux1.org               (_)>(_) (_)        (_)   (_)    (_)'  _\o_
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screwy-namespaces.ii.gz
Type: application/x-gzip
Size: 4733 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20000901/e06d8945/attachment.bin>


More information about the Gcc-bugs mailing list