C Macro deeper meaning?
Andrew Edwards via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Jan 30 20:36:54 PST 2016
On Sunday, 31 January 2016 at 03:13:46 UTC, Adam D. Ruppe wrote:
> On Sunday, 31 January 2016 at 02:58:28 UTC, Andrew Edwards
> wrote:
>> But it cannot be that simple, so what am I missing?
>
> I'm guessing the macro was there in C to silence compiler
> warnings about not using a return value. So I think your
> translation is ok:
>
> NOTUSED(somefunction(....));
>
> still calls the function, so the behavior is the same. If I'm
> right, the macro was just about discarding the return value in
> such a way as to tell the compiler warning / lint program that
> you intentionally wanted to ignore it.
Okay, got it. Much appreciated.
More information about the Digitalmars-d-learn
mailing list