Hi there.  Some very simple code generates a warning when compiled on gcc
4.1.2.  The code compiles cleanly, when using gcc 3.4.6

The bug involves the use of fmaxf function that is defined in math.h.  First,
here is the relevant section: I'm attaching the source file along with the
output of the compile command with the -v and -save-temps option.  Feel free to
let me know what more information is required.

Next, this is the command I used to compile this file, along with the results.
[EMAIL PROTECTED]:~$ gcc Lab9.c -Wall -o Lab9 -lm
Lab9.c: In function ‘printResults’:
Lab9.c:115: warning: implicit declaration of function ‘fmaxf’
Lab9.c:115: warning: incompatible implicit declaration of built-in function
‘fmaxf’

On a machine that has the older version of gcc installed, I do not receive this
warning.

The code still runs correctly in both cases, however.


-- 
           Summary: math.h functions generate warnings on newer version of
                    gcc
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mjt9 at geneseo dot edu
 GCC build triplet: i486-linux-gnu
  GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31422

Reply via email to