Header Guards

Started by
10 comments, last by larspensjo 11 years, 9 months ago

I am working in the automotive business, and they have a lot of embedded systems these days. Not that I have seen more than a couple of them, but none had GCC.


Do the compilers for those platforms have decent support of all C++ features? Memory allocation? The functions in <cmath>? Templates? Exceptions? If the answer to all of those is "yes", then you have a point about warning about lack of support for `#pragma once'. If not, having to use header guards is one more oddity about this environment that you have to be aware of, and the OP should feel free to use `#pragma once' in other environments.
Advertisement

[quote name='larspensjo' timestamp='1342366681' post='4959282']
I am working in the automotive business, and they have a lot of embedded systems these days. Not that I have seen more than a couple of them, but none had GCC.


Do the compilers for those platforms have decent support of all C++ features?[/quote]
Not at all.
If not, having to use header guards is one more oddity about this environment that you have to be aware of, and the OP should feel free to use `#pragma once' in other environments.
[/quote]
I agree. Notice that OP didn't specify language, and I just wanted to point out that GCC probably isn't used ubiquitously in the embedded business (and neither is C++). But I suppose that, considering the sub set of C++, GCC will be more common.
[size=2]Current project: Ephenation.
[size=2]Sharing OpenGL experiences: http://ephenationopengl.blogspot.com/

This topic is closed to new replies.

Advertisement