m4-discuss
[Top][All Lists]
Advanced

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

Re: Having Trouble with m4 Input (m4 version 1.4.13)


From: Gary V. Vaughan
Subject: Re: Having Trouble with m4 Input (m4 version 1.4.13)
Date: Wed, 8 Sep 2010 00:13:09 +0700

Hi Tom,

On 7 Sep 2010, at 23:49, Tom Browder wrote:

> On Tue, Sep 7, 2010 at 11:16, Tom Browder <address@hidden> wrote:
>> On Tue, Sep 7, 2010 at 10:50, Gary V. Vaughan <address@hidden> wrote:
> ...
>> I have to say, though was that my initial excitement [for m4 capabilities] 
>> was the
>> avoid-multiple-reading-of-header-files possibility more than anything
>> else.  And that is still my interest (I see that is one of the
> 
> Well, duh, I just found "#pragma once" in GNU cpp--the answer for that
> problem.  I vaguely remember reading about it once but...

Though I haven't checked the docs or the code, I have a pretty strong conviction
that gcc is actually pretty smart without the pragma too... it remembers any
headers that are entirely contained in cpp guards (inside the header file),
and if it encounter another #include of the same file without a state change
in the guard macro, it ignores the #include and gets on with the rest of the
file.

Cheers,
-- 
Gary V. Vaughan (address@hidden)

Attachment: PGP.sig
Description: This is a digitally signed message part


reply via email to

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