4 ms·
Also, with #pragma once (practically supported by every compiler toolchain) we don't need to do the if-not-defined-include trick.
by tunnuz 9y ago
Also, with #pragma once (practically supported by every compiler toolchain) we don't need to do the if-not-defined-include trick.
- llukas 9y agoNot if you do embedded.
- CamperBob2 9y agoWhat does "embedded" have to do with anything? #pragma once works fine in gcc-arm-none-eabi.
- fnj 9y agoI think he means you may not have #pragma once available in every embedded compiler. Embedded compilers are a mixed bag; gcc is a standout.
- llukas 9y agoYes there is world out there outside of gcc sphere ;)
- com2kid 9y agoEven ARM's embedded cortex-m compilers have supported #pragma once for years now. Maybe some of the 8-bit micros still don't..?
- fnj 9y agoDidn't you ever have to program a Persistor 68332 with an ancient version of CodeWarrior? How about CCS C for the 18F PIC?
- com2kid 9y agoThankfully no, M0s nearly come in cracker jack boxes now days. A lot of what used to be on 8bits are moving to M0s because why the heck not. Commercially advertised prices are around 60 cents in bulk, corporate buys in the 100s of thousands are going to be cheaper than that. Death to 8bits! :)
- gpderetta 9y agoFWIW we had issues with pragma once, MSVC and symlinks.
- deleted 9y ago[deleted]