documentation is unclear egcs 1.0

Klamer Schutte kscp1@fel.tno.nl
Mon Dec 8 06:33:00 GMT 1997


First of all: thank you for creating egcs 1.0!

gcc -Wall gives lots of warnings when compiling something with X11/Xlib.h,
like:
/usr/X11R6/include/X11/Xlib.h:2135: warning: type defaults to `int' in declaration of `XSetTransientForHint'

This could be a glitch in my X11 include files, but is very annoying.

The code in the include files:
extern XSetTransientForHint(
#if NeedFunctionPrototypes
    Display*            /* display */,
    Window              /* w */,
    Window              /* prop_window */
#endif
);

Reading the documentation about warnings:

`-Wimplicit'
     Warn whenever a function or parameter is implicitly declared, or
     when a type implicitly defaults to `int'.

...

`-Wreturn-type'
     Warn whenever a function is defined with a return-type that
     defaults to `int'.  Also warn about any `return' statement with no
     return-value in a function whose return-type is not `void'.

This last paragraph (on -Wreturn-type) indicicates to me (non-native 
English speaker) that using (-Wall -Wno-return-type) should clear this error 
-- but it doesn't.  Re-reading the docs suggested the use of -Wno-implicit
-- which does clear the warnings. Can the documentation be improved on this
point?

Klamer
-- 
Klamer Schutte, E-mail: Schutte@fel.tno.nl
Electro-Optics group, TNO Physics and Electronics Laboratory
Tel: +31-70-3740469 -- Fax: +31-70-3740654 -- Home phone: +31-79-3423924



More information about the Gcc-bugs mailing list