Re: [cc65] preprocessor hazzle...

Date view Thread view Subject view

From: Christian Groessler (cpg_at_aladdin.de)
Date: 2002-07-26 22:15:20


Hi,

On 07/26/2002 09:23:30 PM ZE2 Ullrich von Bassewitz wrote:
>
>On Fri, Jul 26, 2002 at 07:48:59PM +0200, groepaz wrote:
>> shouldnt the compiler ignore #pragmas that it doesnt support? (instead
>> of issuing an error).... sorry if thats a dumb question, i've never
>> used pragmas myself in a portable program before, and didnt stumble
>> about any that would cause problems until now either ;=P
>
>The compiler *should* issue a warning, as the following code snippet from
>pragma.c shows:
>
>    if (Pragma == PR_ILLEGAL) {
>       	/* According to the ANSI standard, we're not allowed to generate errors
>       	 * for unknown pragmas, however, we're allowed to warn - and we will
>       	 * do so. Otherwise one typo may give you hours of bug hunting...
>       	 */
>       	Warning ("Unknown #pragma `%s'", CurTok.Ident);
>       	return;
>    }

Wasn't the behaviour of #pragma implementation defined? (at least in
c89?).
I remember a code snippet from a 1.x gcc version, which when
encountering a pragma directive started a game from /usr/games?
"This implementation defines #pragma this way" :-)

regards,
chris

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-07-26 22:17:42 CEST