This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [rfc] add __FILE__ and __LINE__ to internal_error()


"J.T. Conklin" wrote:

> Unfortunately, without requiring gcc or C9X, we can't use macros with
> variable argument lists.  Otherwise, I would recommend that internal-
> error() and internal_verror() be macros that expand __FILE__ and __LINE__
> before calling "real" functions under the hood.

I'll strongly concure with this sentiment.  I've used systems (1) that
have tried to hide the passing of __FILE__ and __LINE__ while still
supporting varargs.  Those experiences led me to conclude that while
having explicit __FILE__ and __LINE__ arguments was a pain, it was far
less of a pain then trying to set up and then get people to consistently
use convoluted macros that did the same thing.

The only pratical alternative I could think of was to drop varargs from
internal_error().

	Andrew

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]