delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/19/16:39:40

From: Paul Shirley <Paul AT foobar DOT co DOT uk DOT chocolat>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Why two identical typedef are considered an error in DJGPP?
Date: Sun, 19 Jan 1997 15:30:42 +0000
Organization: wot? me?
Lines: 28
Distribution: world
Message-ID: <91oEmJAi4j4yEwFm@foobar.co.uk>
References: <01IE7MKQWZ2Q003361 AT cc DOT uab DOT es>
<Pine DOT A41 DOT 3 DOT 94 DOT 970115082052 DOT 92882A-100000 AT acs2 DOT acs DOT ucalgary DOT ca>
<jRKDPBAXkX3yEw9J AT foobar DOT co DOT uk> <slrn5e086r DOT gp5 DOT davep AT hagbard DOT demon DOT co DOT uk>
Reply-To: Paul Shirley <junk AT defeating DOT email DOT address>
NNTP-Posting-Host: chocolat.foobar.co.uk
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <slrn5e086r DOT gp5 DOT davep AT hagbard DOT demon DOT co DOT uk>, Dave Pearson
<davep AT hagbard DOT demon DOT co DOT uk> writes
>And it works for you? In that case, this should work:
>
>----------------------------------------------------------------------
>#ifndef BYTE
>typedef unsigned char BYTE;
>#endif
>
>#ifndef BYTE
>typedef unsigned char BYTE;
>#endif
>
>int main( void )
>{
>    return( 0 );
>}
>----------------------------------------------------------------------

Your right, it fails on gcc.

It works on VC4.2, Watcom 10.6 and BorlandC but that may be because they
don't complain about the redefinition anyway (unless it differs).

Looks like I'm getting confused in my old age!

---
Paul Shirley: shuffle chocolat before foobar for my real email address

- Raw text -


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