This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/30916] Wrong ‘float’ rather than ‘double’ due to prototype warning
- From: "hermantenbrugge at home dot nl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Feb 2007 15:26:09 -0000
- Subject: [Bug c/30916] Wrong ‘float’ rather than ‘double’ due to prototype warning
- References: <bug-30916-6794@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from hermantenbrugge at home dot nl 2007-02-23 15:26 -------
Subject: Re: Wrong =?windows-1252?Q?=91float=92_rather_?=
=?windows-1252?Q?than_=91double=92_due_to_prototype_warning?=
manu at gcc dot gnu dot org wrote:
> ------- Comment #2 from manu at gcc dot gnu dot org 2007-02-23 14:21 -------
> I think the warning is correct. If there were no prototype, the value would be
> passed as double. Since there is a prototype, the value is passed as float.
>
> That is what -Wconversion warns about up to GCC 4.2 (check the manual for the
> description of Wconversion). Since GCC 4.3, those warnings have been moved to
> Wtraditional-conversion and Wconversion has a new purpose.
>
> More info: http://gcc.gnu.org/wiki/NewWconversion
>
> (Please, notice that the project is not finished yet, so things may change
> before GCC 4.3 is released).
>
> Please, let us know if this answers your question, so we can close this bug
> report.
>
Yes. This answers the question. Sorry about the noise. I was testing
this with
gcc version 4.1.1 20070105 (Red Hat 4.1.1-51) on fedora core 6. When I use
gcc version 4.3.0 20070222 (experimental). The problem goes away.
So the problem report can be closed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30916