delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/11/10/21:41:44

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <0ce101c8240c$3a5dea60$6501a8c0@paul>
From: "Paul Edwards" <mutazilah AT gmail DOT com>
To: <cygwin AT cygwin DOT com>
Subject: cygwin 1.5.24-2 gcc 3.4.4 stdio.h
Date: Sun, 11 Nov 2007 13:40:29 +1100
MIME-Version: 1.0
X-Mailer: Microsoft Outlook Express 6.00.2800.1437
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

I just downloaded cygwin 1.5.24-2 (just a couple of hours ago) and
compiled the following program with "gcc -ansi fred.c"
(NOTE the "-ansi" keyword):

#define pid_t fred was here

#include <stdio.h>

int main(void)
{
    printf("hello, world\n");
    return (0);
}

And got the following result:

In file included from /usr/include/stdio.h:46,
                 from fred.c:3:
/usr/include/sys/types.h:180: error: parse error before "was"
In file included from /usr/include/sys/types.h:373,
                 from /usr/include/stdio.h:46,
                 from fred.c:3:
/usr/include/cygwin/types.h:146: error: parse error before "fred"


ie it is hitting a typedef for pid_t


This is the compiler version:

gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Is "-ansi" not the correct thing to do to get pure ANSI C89 headers?

BFN.  Paul.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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