delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/03/01/20:00:14

X-Spam-Check-By: sourceware.org
Date: Wed, 1 Mar 2006 20:00:03 -0500 (EST)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Basavaraj Hiremath <hbasava AT yahoo DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: compiler option
In-Reply-To: <20060302004154.89418.qmail@web36115.mail.mud.yahoo.com>
Message-ID: <Pine.GSO.4.63.0603011955430.7712@access1.cims.nyu.edu>
References: <20060302004154 DOT 89418 DOT qmail AT web36115 DOT mail DOT mud DOT yahoo DOT com>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Wed, 1 Mar 2006, Basavaraj Hiremath wrote:

> Hi,
> I am compiling a file(strerror.c) with following
> option
> -bash-2.05b$ arm-wince-pe-gcc -mcpu=xscale -c -ansi
                                                ^^^^^
> -D__stdcall= -D_OFF_T_ -DHAVE_CONFIG_H
> -I/usr/local/wince/cross-tools/include -I. -I./../include -W -Wall
> -Wtraditional -pedantic ./strerror.c -o pic/strerror.o
>
> It's giving following compilation error
> /strerror.c:626: error: expected identifier or '('
> before string constant
> /strerror.c:628: error: expected identifier or '('
> before '{' token
>
> file strerror.c has following function
>
> char *
> strerror (errnoval)  -> line 626
>   int errnoval;
    ^^^^^^^^^^^^^
> {                    --> line 628
>   const char *msg;
>   static char buf[32];
> -----------
> -----
> }
>
> Could somebody tell me, what is the compiler option to go pass thru this
> kind of implementation?

You are compiling a K&R-style C function header in ANSI mode -- of course
you're getting an error.  Either remove the -ansi flag, or fix the file to
use ANSI-style declaration.

Google for "k&r ansi" for innumerable resources on this.  Oh, and this has
nothing to do with Cygwin.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
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