Hello All,

In most of GCC source code, it is perfectly normal to expect that no warnings should appear, even if the sources are compiled with -Wall or more. Actually the GCC bootstrap process seems to require this.

However, I see some occasions where warnings might be quite difficult to avoid:

1: DLSYM: This probably should concern the plugin branch (or experiment): the POSIX way of getting a routine inside a plug-in is dlsym (or which happens to return a pointer, which has to be cast to a function pointer somewhere. This cast will get a warning at a certain level, like warning: ISO C forbids conversion of object pointer to function pointer type This warning cannot be easily avoided. IIRC, some future POSIX standard is expected to provide a dlfsym variant to dlsym.

2. generated code: when some C files are generated, it may be hard to avoid some warnings, typically a generated C function might have unused arguments (which might be not very easy to detect at generation stage).

So is there an easy way to have some acceptable warnings in GCC?

Regards.
--
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***

Reply via email to