c/6980: -Wbad-function-cast gives bogus warning for (double) rand()

bangerth@dealii.org bangerth@dealii.org
Fri Mar 7 02:48:00 GMT 2003


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



More information about the Gcc-bugs mailing list