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

Tom Browder <[email protected]>
Newsgroups gmane.comp.gnu.m4.general
Message-ID <[email protected]>
On Tue, Sep 7, 2010 at 12:13, Gary V. Vaughan <[email protected]> wrote:
> On 7 Sep 2010, at 23:49, Tom Browder wrote:
>> On Tue, Sep 7, 2010 at 11:16, Tom Browder <[email protected]> wrote:
...
>> 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.

Gary, you're correct.  Ian, one of the gcc developers, told the
gcc-help list, in response to my query. that "#pragma once" is
obsolete.  A cpp optimization takes care of it auto-magically, so I
don't need m4 for that.

Regards,

-Tom

Thomas M. Browder, Jr.
Niceville, Florida
USA
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.