This is the mail archive of the
mailing list for the GCC project.
Re: Bug in cmath namespace
Jens Vollinga wrote:
>> GCC's g++ includes the C <math.h>, #undef's the macros, does a "using
>> >from the global namespace, and adds inline versions of sin(float) and
>> sin(long double).
> thanks for the fast reply.
> My problem was not to understand what gcc does. gcc works like you described
> it above. My problem is whether gcc does it correctly according to the ISO
> standard. In paragraph 4 of section 184.108.40.206 in that standard it says that
> there should be no ::sin if you include cmath, only a std::sin. But since I
> am not well trained in legal speak and have only a '98 draft version of the
> standard available I am not sure if a am right or wrong.
g++ is wrong here, but it is unlikely to be fixed, and also in future
versions of the standard it is likely that it will be allowed to put sin
into the global namespace (as nearly everybody does anyway)