This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


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

Re: deprecated GNU ## extension used


Neil Booth <NeilB@earthling.net> writes:

> 
> #define prefix(...) do_ ## __VA_ARGS__
> prefix(a, b, c, d)
> prefix()
> 
> must come out as
> 
> do_a, b, c, d
> do_

And your point is?  The ## operator only has to have a special meaning
when preceded by a comma.  This is not the case in your example so
where is the problem?

> Your line number example could be achieved by rewriting your code to
> include the %d and line number in the format and arguments.

This goes against anything this macro is designed for, namely easy to
use by the caller.  You can enforce all kinds of rules but it's plain
silly.


Dropping this functionality means breaking lots of code since there is
a 10 year history of using this feature.  Printing warnings nows means
polluting the compiler output for too many compilations unnecessarily.
The GNU method *is* superior to the ISO C method since it allows more
useful applications.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

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