Comments (5)
I think it's hard to use this since:
1.NuttX need comatablie with C89 standard
2.#pragma once isn't defined in C standard
I also don't see the benefit to switch #ifndef/#define/#endif to #pragma once, do you have any particular reason?
from nuttx.
No compiler dependencies are permitted directly anywhere in .c or .h files. #pragma may not be used there.
Compiler dependencies may be "indirectly" used if they are added to included/nuttx/compiler.h and a comon definition is provided for all tools. But even that use is discouraged. The OS should not, in general, depend on any property of any toolchain.
So, please, do not consider adding #pragma to any source files.
from nuttx.
@xiaoxiang781216 just seeing a lot of complex header protection defines that someone has to put together (or script) that would go away.
@patacongo I appreciate that, normally I wouldn't advocate for a pragma as they are compiler implementation specific. It's too bad that it hasn't made its way into the language standard proper yet. It's been supported by basically all compilers for a dozen years now.
If, at some point, an exception would be made for this particular pragma, let me know!
from nuttx.
No worth it. There is no real benefit and a very, very big downside. We must not introduce ANY compiler dependencies in the source code. We have followed that rule for a dozen years and it will not change now.. Let's not consider this.
from nuttx.
Very bad idea. There is ABSOLUTELY not good reason to do this other than your personal preference which does not carry any weight in this.
from nuttx.
Related Issues (20)
- ESP32S3 usbnsh hang on ps command HOT 6
- risc-v/sg2000: Kernel fails to boot with GCC `-O2`
- armv7-m/arm_mpu.c: MPU regions >= 2GB cannot be configured HOT 8
- arm_cache.c: up_disable_dcache() has undefined behavior in write-back mode HOT 2
- Create an Issue template to automatically assigned the label tags when someone open an Issue HOT 3
- OpenAMP CMake configuration error HOT 4
- CONFIG_CONSOLE_SYSLOG and CONFIG_SYSLOG_CONSOLE are misleading HOT 2
- nrf9160/nrf9160-dk:modem_ns crash on start HOT 12
- nrf52/ieee802.15.4/6lowpan server crash HOT 1
- speed up CI checks HOT 4
- Adding Board Support in Nuttx: Steps and Requirements HOT 4
- mkrd fail in rc.sysinit HOT 5
- SIM is mounting /tmp as vfat instead of using TMPFS
- NSH I/O redirection and I/O operation doesn't work and incomplete HOT 2
- Cannot Run ESP32C6-devkitm HOT 4
- GitHub Status: Disruption in service with some Redis clusters Jul 31, 2024
- Add esp32c6 power manager feature HOT 3
- [BUG] Just a test HOT 1
- [BUG] kasan read access error in umm_initialize HOT 9
- [BUG] Running lm3s6965-ek:qemu-protected with gdb-multiarch is crashing HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuttx.