Re: [AD] allow stricter warnings

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Thomas Fjellstrom wrote:

On March 4, 2005 10:56 pm, Peter Wang wrote:
Hi,

This patch allows you to include Allegro headers into a program you wish
to compile with gcc -Wshadow -Wstrict-prototypes -Wmissing-prototypes (I
need this for something).  You could do it before if your Allegro
headers were in a system header directory, but if they were not then gcc
would spew warnings about missing prototypes and parameters shadowing
'line' (Allegro), 'time' (libc), 'y1' (libc) and 'vsync' (Allegro).

Peter

`-Wshadow'
    Warn whenever a local variable shadows another local variable,
    parameter or global variable or whenever a built-in function is
    shadowed.

how would that have any effect on a users code if the problem area is in allegro functions?

gcc even warns for parameters in function prototypes; e.g.

      void f(int time);

gets a warning because there is a libc function time().  *shrug*

[Sorry for the duplicate Thomas, I forgot to set the To: last time.]

p.s. Peter, if this doesn't get to the list, can you send it on? I've been having problems getting messages to the list :(

Guess it didn't come.

Anyway, I've committed the patch today.

Peter




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/