Help - buried in compiler warnings.



I have an app which compiles with no errors or warnings
on gcc 3.4.4 and earlier.

But a user reports that with gcc 4.0.2 (FC 4) there are pages
of compiler warnings, all apparently related to passing
pointers to unsigned char arrays as arguments to functions
whose prototype calls for pointers to signed char arrays.
E.g., "warning: pointer targets in passing argument 1 of strlen
differ in signedness."

The compiler options used are -g -O -Wall

Am I correct in believing that the compiler is being
overly picky? If so, is there a compiler option that
will revert to the warning level of gcc 3.4.4 ?

(I don't have gcc 4.0.2 on my system so am sort of
flying blind here.)

Regards,
Charles Sullivan










.



Relevant Pages

  • Re: Tcl 8.5 HP/UX Compiler warnings
    ... results and "the optional HP ANSI C compiler", ... stat64 struct pointers are being ... The elementary types of the structure ... other warnings I cited are similarly harmless. ...
    (comp.lang.tcl)
  • Re: Absolute addressing on the ARM
    ... But what puts me off though is, after generating ARM ... I end up having to use gcc anyway! ... And pretty much any other compiler in the Linux world will ... gcc will assume that pointers are properly aligned according to their ...
    (comp.arch.embedded)
  • Re: Does -O3 enable more warnings than just -Wall -Wextra with gcc?
    ... I don't think gcc invokes that kind of reasoning when deciding ... about it only at a higher optimization level *specifically because the ... the behavior is well defined *by the compiler* at the current ... so one could make a decent argument that shouldn't require warnings when ...
    (comp.lang.c)
  • Re: Is it standard and practical to use long long types?
    ... right option for putting the compiler in conforming mode. ... Bogus/idiotic warnings when all warnings are enabled. ... For reference, this what I get from gcc, when invoked in conforming mode ...
    (comp.lang.c)
  • Re: Is it standard and practical to use long long types?
    ... right option for putting the compiler in conforming mode. ... Bogus/idiotic warnings when all warnings are enabled. ... For reference, this what I get from gcc, when invoked in conforming mode ...
    (comp.lang.cpp)