delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/14/12:38:21

Date: Tue, 14 Jan 1997 17:41:10 +0000
From: "x DOT pons AT cc DOT uab DOT es" <ILGES AT cc DOT uab DOT es>
Subject: Why two identical typedef are considered an error in DJGPP?
To: djgpp AT delorie DOT com
Message-id: <01IE7MKQWZ2Q003361@cc.uab.es>
Organization: Universitat Autonoma de Barcelona
MIME-version: 1.0

Dear programmers,

If I write something like this in a xxx.h file

  typedef unsigned char BYTE;

and I have *THE SAME* typedef in some other yyy.h file,
both included in the same .c file, the DJGPP compiler complains
that:

  file xxx.h line n  redefinition of `BYTE'
  file yyy.h line m  `BYTE' previously declared here

Is there some way to avoid this error, which is not even a warning
in other compilers (provided, of course, that both definitions are
identical)?

Thanks in advance,

XP

- Raw text -


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