This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Warning elimination patch in sched.c
- To: "'Kaveh R. Ghazi'" <ghazi at caip dot rutgers dot edu>, egcs at cygnus dot com
- Subject: RE: Warning elimination patch in sched.c
- From: Bjørn Wennberg <Bjorn dot Wennberg at lcc dot no>
- Date: Tue, 10 Mar 1998 15:40:45 +0100
I did include the appropriate include-files to get the correct
definition of qsort. That
is why I find the warning messages strange.
bjornw>
> -----Original Message-----
> From: Kaveh R. Ghazi [SMTP:ghazi@caip.rutgers.edu]
> Sent: 10. mars 1998 14:42
> To: Bjorn.Wennberg@lcc.no; egcs@cygnus.com;
> schmid@ltoi.iap.physik.tu-darmstadt.de
> Subject: RE: Warning elimination patch in sched.c
>
> > From: Bjørn Wennberg <Bjorn.Wennberg@lcc.no>
> >
> > This might be the correct solution to the problem but I'm curios to
> why
> > the warnings are reported from gcc.
> > If I create a small file containing:
> > -----
> > static int function(int *, int *);
> > int main() {
> > qsort(0, 0, 0, function);
> > }
> > ------
> > Then I do not get a warning message from gcc. So why do we get a
> warning
> > message when compiling haifa-sched.c (or sched.c)?
> > bjornw>
>
> Your program must include stdlib.h to prototype qsort's argument
> list, or the -W -Wall flags won't know anything's amiss.
> --
> Kaveh R. Ghazi Project Manager / Custom
> Development
> ghazi@caip.rutgers.edu ICon CMT Corp.