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]

[Bug c++/14430] constructors with rectroactively declared default argument not considered for conversions


------- Additional Comments From bangerth at dealii dot org  2004-03-04 13:55 -------
Confirmed, up to present mainline. 
 
What I find really funny is what we get for this testcase from mainline: 
g/x> /home/bangerth/bin/gcc-3.5-pre/bin/c++ -c x.cc 
x.cc:4: error: conversion from `int' to non-scalar type `X' requested 
x.cc:6: error: conversion from `int' to non-scalar type `X' requested 
x.cc:12: error: declaration of `Y y1' 
<internal>:0: error: conflicts with previous declaration `double y1(double)' 
 
That seems totally bogus, since there is no use of 'double' in the entire 
program. Turns out that gcc has a built-in for the bessel function y1(), 
so y1 is a reserved name in the global scope. If you ask me, having functions 
in the math library that consist of a single letter and a number is not 
a very mature idea :-( To avoid this error, one therefore has to rename y1 
to some other (unprotected) name. 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
      Known to fail|                            |2.95.3 3.2.3 3.3.3 3.4.0
                   |                            |3.5.0
   Last reconfirmed|0000-00-00 00:00:00         |2004-03-04 13:55:44
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14430


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