libifconfig icon indicating copy to clipboard operation
libifconfig copied to clipboard

Verify that '#pragma once' is an acceptable header guard lock

Open Savagedlight opened this issue 9 years ago • 1 comments

Check whether all compilers in base supports the '#pragma once' guard lock. Do also consider corner cases, like multiple copies of the header being included, from different paths.

Reported by: Ravi Pokala

Savagedlight avatar Apr 12 '16 13:04 Savagedlight

Nope. While the base compilers all technically support #pragma once, it is considered bad style. Except for a few things in contrib, no header file in the base system uses it. Better to use the usual ifndef IFCONFIG_H style.

asomers avatar May 01 '17 00:05 asomers