Date: 7 Mar 2003 02:42:19 -0000 Message-ID: <20030307024219.12886.qmail@sources.redhat.com> To: djgpp-workers AT delorie DOT com, gcc-bugs AT gcc DOT gnu DOT org, gcc-prs AT gcc DOT gnu DOT org, nobody AT gcc DOT gnu DOT org, richdawe AT bigfoot DOT com From: bangerth AT dealii DOT org DOT gcc-prs@gcc.gnu.org, nobody AT gcc DOT gnu DOT org, richdawe AT bigfoot DOT com, gcc-gnats AT gcc DOT gnu DOT org X-Mailer: gnatsweb 2.9.3 Subject: Re: c/6980: -Wbad-function-cast gives bogus warning for (double) rand() Reply-To: bangerth AT dealii DOT org, djgpp-workers AT delorie DOT com, gcc-bugs AT gcc DOT gnu DOT org Synopsis: -Wbad-function-cast gives bogus warning for (double) rand() State-Changed-From-To: open->analyzed State-Changed-By: bangerth State-Changed-When: Fri Mar 7 02:42:19 2003 State-Changed-Why: Correct. Testcase: ------------------- int foo(); void bar () { (double) foo(); } ----------------------- Output is bogus: g/x> /home/bangerth/bin/gcc-3.4-pre/bin/gcc -Wbad-function-cast -c x.c x.c: In function `bar': x.c:3: warning: cast does not match function type This is gccs behavior since seemingly forever. W. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6980