Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2003:
[Freeciv-Dev] Re: (PR#3579) When stdarg.h should be included?
Home

[Freeciv-Dev] Re: (PR#3579) When stdarg.h should be included?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: nightmare@xxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#3579) When stdarg.h should be included?
From: "Raimar Falke" <rf13@xxxxxxxxxxxxxxxxx>
Date: Sat, 29 Mar 2003 03:22:20 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Thu, Mar 27, 2003 at 01:13:54PM -0800, Davide Pagnin wrote:
> On Mon, 2003-03-24 at 01:41, Jason Short wrote:
> > [pagnin - Sun Mar  2 12:20:12 2003]:
> > 
> > > AFAIK, stdarg.h is part of ANSI C standard, and should be included when
> > > variable argument lists relevant macros are used.
> > 
> > ...
> > 
> > > If there are no objection, I will produce a patch that will implement
> > > solution 2.
> > 
> > Do you have a patch?
> > 
> > jason
> > 
> 
> I've prepared the patch, which is attached.
> 
> I've tried it with Linux Redhat 7.3 - xaw, gtk1 and 
> on Tru64 Unix alpha xaw e gtk1 (with native Compaq cc)
> 
> Seems to work without warnings.
> 
> Perhaps some more tests with not common OS / arch can be useful.

The important question is still not answered: what is causing this? 
From IRC:

Feb 26 18:42:26 <Nightmare>     instead of loading stdarg from gcc include 
directory
Feb 26 18:42:42 <Nightmare>     I'm unsure if this is a shortcomings of gcc or 
Tru64
Feb 26 18:42:50 <Nightmare>     but the problem is there
Feb 26 18:43:03 <Nightmare>     my solution is to apply Codestyle suggestion
Feb 26 18:43:11 <Nightmare>     and put stdarg before stdio
Feb 26 18:43:18 <Nightmare>     wherever this is needed
Feb 26 18:43:43 <Nightmare>     there is even a file that needs stdarg and 
don't include it
Feb 26 18:44:08 <Nightmare>     btw, I'm unsure of what the standards say about 
this
Feb 26 18:44:18 <Nightmare>     which file should do the work and how
Feb 26 18:44:35 <McHawk>        it should be indepenet in which order you 
include the files
Feb 26 18:44:53 <McHawk>        I would really like to know if this is a 
general problem of gcc 3.2.2
Feb 26 18:45:04 <McHawk>        or a general problem of gcc 3.2.2 on alpha
Feb 26 18:45:14 <McHawk>        or a problem with your installation
Feb 26 18:45:34 <Nightmare>     I think that gcc 3.2.2 have shortcomings on 
include paths behavior
Feb 26 18:45:56 <Nightmare>     and Tru64 Unix has also problem with stdarg.h 
and va_list
Feb 26 18:46:12 <Nightmare>     so the two problems joined create the whole 
problem

So I'm against applying such a patch without knowledge what is causing
this.

I have however fixed another problem which was also mentioned: the
random including of system header files. The attached patch fixes
this. I will apply it in 24h.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Transported to a surreal landscape, a young girl kills the first woman
  she meets and then teams up with three complete strangers to kill again."
    -- TV listing for the Wizard of Oz in the Marin Independent Journal

Attachment: sort_sys_includes1.diff.gz
Description: sort_sys_includes1.diff.gz


[Prev in Thread] Current Thread [Next in Thread]