-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes/lib (warnings compilation) #495
Conversation
- Fix trice function don't pass fmt to macros ( -Wunused ) - Fix undef preprocessor ( -Wundef )
|
The mixed indent of macros and code is manually adapted. To not spoil the code with I am not sure about the best way to handle that. Any proposals? Edit: Maybe reordering the code that way, that only one code segment needs to be excluded from auto formatting.
If I remember right, I have seen C compilers with some weird function inline syntax. To handle such cases, the user can define the |
The problem is mixing preprocessor directives indenting with statements (if, for, switch, ...) indenting that might yield very misleading looking code when preprocessor is heavy used with code. void foo(void) {
#if TEST1 == 0
#if TEST2 == 0
if (true) { // This if is on the wrong indentation
#endif
#endif
for (int i = 0; i < 10; ++i) {
// do something
}
#if TEST1 == 0
#if TEST2 == 0
} // This brace is on the wrong indentation
#endif
#endif
} I think we can reverse the logic, set
I think you shouldn't code based on formatter (most of the time). We add unnecessary complexity when programming |
be0fc10
to
bc10a84
Compare
bc10a84
to
fc7fba0
Compare
Maybe we keep the trice8|16|32|64.c|h files inside |
Question:
TRICE_INLINE
instead ofstatic inline
. Some compilers got better attributes ?