[Bug c++/14430] constructors with rectroactively declared default argument not considered for conversions
jsm at polyomino dot org dot uk
gcc-bugzilla@gcc.gnu.org
Thu Mar 4 14:26:00 GMT 2004
------- Additional Comments From jsm at polyomino dot org dot uk 2004-03-04 14:26 -------
Subject: Re: constructors with rectroactively declared default
argument not considered for conversions
On Thu, 4 Mar 2004, bangerth at dealii dot org wrote:
> 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.
Built-ins in C++ (apart from those starting __builtin) shouldn't have any
effect on code that doesn't declare the functions as well (by including
the appropriate header), as C++ requires headers to be included to use
standard functions. They should only get activated in the case of a
compatible declaration.
(In C they should probably work this way as well; the compatible
declaration might be implicit in cases with a return type of int.)
In some cases warnings for an incompatible declaration of a built-in
function may be appropriate, but for non-standard functions the code
should still compile.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14430
More information about the Gcc-bugs
mailing list