[Top][All Lists]

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

Re: getting EBADF on MSVC

From: Bruno Haible
Subject: Re: getting EBADF on MSVC
Date: Mon, 19 Sep 2011 23:16:09 +0200
User-agent: KMail/1.13.6 (Linux/; KDE/4.6.0; x86_64; ; )

Hi Paul,

> I also have some qualms about C macros that expand to series of tokens
> with unbalanced braces.

The approach has the big advantage that you can step through the code in a
debugger, and that the entire block expands into a single statement.
(The original approach from gdb-7.2/gdb/exceptions.h has no unbalanced
braces, but the expansion is 2 statements, not 1 statement.)

Actually the unbalanced braces have the advantage that you immediately get a
syntax error if you forget the DONE_MSVC_INVAL token at the end. It happened
to me already.

In memoriam James A. Garfield <http://en.wikipedia.org/wiki/James_A._Garfield>

reply via email to

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