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
