[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: __attribute__((__unused__)) problem

From: John Horigan
Subject: Re: __attribute__((__unused__)) problem
Date: Thu, 11 Apr 2013 00:23:35 -0700

I was only suggesting it for the YYERROR handler, where runtime performance
is not a concern. For the YYSTACK_RELOCATE macro there needs to be a
#pragma to silence the C4127 warnings. I cannot comprehend why Microsoft
would issue a warning for this incredibly common C idiom.

-- john

On Wed, Apr 10, 2013 at 10:54 PM, Frank Heckenbach

> John Horigan wrote:
> > Why not replace '/*CONSTCOND*/ 0' with a non-constant expression that is
> > guaranteed to be false, like 'rand() < 0'?
> Please don't! Adding extra runtime work to silence a compiler
> warning is absurd.
> I don't use that compiler, but "do ... while (0)" is a
> well-established idiom in C macros, so there must be a common way to
> deal with it, whether it's a pragma or some workaround.
> Frank

reply via email to

[Prev in Thread] Current Thread [Next in Thread]