X-Spam-Check-By: sourceware.org Date: Wed, 1 Mar 2006 20:00:03 -0500 (EST) From: Igor Peshansky Reply-To: cygwin AT cygwin DOT com To: Basavaraj Hiremath cc: cygwin AT cygwin DOT com Subject: Re: compiler option In-Reply-To: <20060302004154.89418.qmail@web36115.mail.mud.yahoo.com> Message-ID: References: <20060302004154 DOT 89418 DOT qmail AT web36115 DOT mail DOT mud DOT yahoo DOT com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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/