[Top][All Lists]

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

Re: Conflicts with header guards

From: Frank Heckenbach
Subject: Re: Conflicts with header guards
Date: Mon, 24 Sep 2012 21:58:33 +0200

Paul Eggert wrote:

> On 09/21/2012 02:42 AM, Akim Demaille wrote:
> > we should at least always start
> > with YY_ to stay within our realm:
> > 
> >    foo/bar.hh    -> YY_YY_FOO_BAR_HH
> >    0foo--bar12.h -> YY_YY_0FOO_BAR12_H
> > 
> > (two YY_: one for Bison, the other for the prefix)
> That should work, but can't we shorten the second prefix
> to something simpler, like "_"?  That way, the symbols
> would be YY__FOO_BAR_HH, which is a bit more palatable.

Does this actually matter? Since header guards are usually used in
exactly two places (in successive lines) and otherwise should not
pollute the name space too much, obscure might actually be better.
(For my own, manually written guards, I've gotton used to even
appending "_INCLUDED" to reduce the risk of conflicts.)


reply via email to

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