delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/02/10/13:52:33

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <3E47F4A5.C517F99F@phekda.freeserve.co.uk>
Date: Mon, 10 Feb 2003 18:51:17 +0000
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.23 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: djgpp: djgpp/include/string.h,strings.h
References: <10302100511 DOT AA22688 AT clio DOT rice DOT edu> <3E47A3BD DOT 537F8D34 AT phekda DOT freeserve DOT co DOT uk> <200302101652 DOT h1AGqx002913 AT envy DOT delorie DOT com>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

DJ Delorie wrote:
> 
> > "__extension__" is just a way of ignoring errors when -pedantic is used.
> >
> > I don't know why we use "__extension__" in <stdint.h>.
> 
> So that when users compile their applications with -pedantic, we don't
> cause errors.  We have to be very careful about stuff like this in the
> headers, but not in the library sources (since we control the compile
> flags for those).
>
> Headers must work correctly for any set of compile flags.

<Lightbulb above head> Ah, I think I see now. If we support a 64-bit type,
i.e.: long long, then we must define the *int64_*t types in <stdint.h>. But
C89 has no "long long" type, hence -pedantic would cause gcc in C89 mode to
barf if there was no "__extension__".

Bye, Rich =]

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019