Newer gcc swallow version control keywords
Oleg Goldshmidt
pub at goldshmidt.org
Tue Oct 18 13:50:30 IST 2011
On Tue, Oct 18, 2011 at 12:57 PM, Elazar Leibovich <elazarl at gmail.com> wrote:
> On Tue, Oct 18, 2011 at 12:50 PM, Oleg Goldshmidt <pub at goldshmidt.org>
> wrote:
>
>> Someone may alter keyword expansions just before the build, too.
>
> I'm not sure I understand your comment. Are you telling that this is
> unlikely? I agree, this is not a very big point.
I am saying that protecting against someone who may modify a keyword
expansion or create his own string of a similar format is not a big
issue.
> I didn't understand how, eg, my C++ scheme don't work. I think it should
> work even if you're including the $Id$ strings in the headers files.
Apart from the fact that you assume that main.cc is mine (what if my
product is a library?), depends on a whole lot of things I wouldn't
necessarily need for any other purpose, makes the strings global and
mutable, and won't pick up, e.g., the case of wrong header I mentioned
before (I checked)?
This is a good idea in general, but it's not really an improvement.
The trusted old scheme has all the needed properties and if gcc had an
option to disable this particular kind of optimization selectively I
wouldn't have a problem.
--
Oleg Goldshmidt | pub at goldshmidt.org
More information about the Linux-il
mailing list