From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7843 invoked by alias); 22 Nov 2001 16:18:59 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 7818 invoked from network); 22 Nov 2001 16:18:57 -0000 Received: from unknown (HELO smtp-server2.tampabay.rr.com) (65.32.2.69) by sourceware.cygnus.com with SMTP; 22 Nov 2001 16:18:57 -0000 Received: from ctrawick (653227hfc195.tampabay.rr.com [65.32.27.195]) by smtp-server2.tampabay.rr.com (8.11.2/8.11.2) with SMTP id fAMGInO22335; Thu, 22 Nov 2001 11:18:49 -0500 (EST) Message-ID: <003801c17371$5df4af60$0301a8c0@nielsenmedia.com> From: "Chris Trawick" To: "Johan Walles" Cc: References: <3BFD1E28.80805@appeal.se> Subject: Re: Two identical typedefs not allowed? Date: Thu, 15 Nov 2001 17:33:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-SW-Source: 2001-11/txt/msg00129.txt.bz2 i can't think of a compiler flag to get gcc to accept that, but i may yet be of some help. i assume you're running into this because you're including the same header twice, right? or a nice little recursive tree of dependant headers? that's when this usually pops up. try something like this in your headers: /* start of projectname header.h */ #ifndef __PROJECTNAME_HEADER_H__ #define __PROJECTNAME_HEADER_H__ /* contents of projectname header.h */ #endif /* __PROJECTNAME_HEADER_H__ */ /*end of pojectname header.h */ hope it helps, chris ----- Original Message ----- From: "Johan Walles" To: Sent: Thursday, November 22, 2001 10:47 AM Subject: Two identical typedefs not allowed? > Hi! > > When I try to compile the following code with gcc-3.0.2... > > typedef int adam; > typedef int adam; > > ... I get the following error: > > redefinition.c:2: redefinition of `adam' > redefinition.c:1: `adam' previously declared here > > Is there a flag that makes gcc accept this construct? > > Cheers //Johan >