bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] lib/rename.c: Conditionally define the out label


From: Pádraig Brady
Subject: Re: [PATCH] lib/rename.c: Conditionally define the out label
Date: Mon, 02 Jun 2014 01:07:14 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 06/02/2014 12:53 AM, Paul Eggert wrote:
> Paul Eggert wrote:
>> Pádraig Brady wrote:
>>
>>> +# define _GL_UNUSED_LABEL _GL_UNUSED;
>>
>> Why is there a semicolon at the end of that macro definition?
> 
> I removed it just now (since I was syncing to Emacs and I couldn't stand 
> seeing the typo there...).

Well the ; is needed in C++ but optional in C.
I was worried about users leaving out the ; by mistake
and not noticing in the normal case of compiling in C.

I suppose one could contrive a change in behavior using something like

    if (false)
label: _GL_UNUSED_LABEL puts("true");

That would output "true" always.
Better to give the compile error on C++ rather than that silent gotcha.

thanks,
Pádraig.




reply via email to

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