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: 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)
  • 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: Using sparse to catch invalid RCU dereferences?
    ... RCU-protected pointers directly, and all of these would need to be ... in to gcc than I am could probably pull it off. ... // no warnings from sparse due to forced cast ... rcu_assign_pointer(prot, tmp); ...
    (Linux-Kernel)
  • Re: gcc-3.3 issues
    ... > extern' on explicit instantiations ... none of these warnings occur. ... C++ header bits that we install in /usr/include are from an older GCC ... release than the compiler. ...
    (freebsd-current)