tech-kern archive

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

re: #pragma once



On Sun, 16 Oct 2022, matthew green wrote:

i am a fan of #pragma once.  the main reason is that it avoids
the class of bugs where you copy a header and forget to change
the #define and then sometimes the header is empty upon use,
and you end up having to use cpp output to debug it.

I've been bit more than once here...

i'd be ok with using it anywhere -- AFAIK the compiler support
is available everywhere.

<aol>me too</aol>


+--------------------+--------------------------+----------------------+
| Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:    |
| (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul%whooppee.com@localhost    |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette%netbsd.org@localhost  |
| & Network Engineer |                          | pgoyette99%gmail.com@localhost |
+--------------------+--------------------------+----------------------+


Home | Main Index | Thread Index | Old Index