Skip to content
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

Feature request: conditional compilation #2032

Open
starapo7348 opened this issue Mar 9, 2025 · 1 comment
Open

Feature request: conditional compilation #2032

starapo7348 opened this issue Mar 9, 2025 · 1 comment
Labels
Additional info please Further information is requested

Comments

@starapo7348
Copy link

Conditional compilation depending on the C3C compiler version.

In C++, the __cplusplus macro can be used to check the C++ standard and conditionally compile code

#if __cplusplus >= 201103L
// C++11 or newer
#else
// older C++-Version
#endif

What about implementing such a feature?

With such a feature my issue with the code could be handled.

Compilation broken since c3c 0.6.8 -> Error: 'Vector2' could not be found, did you spell it right? #2028

Just an idea.

@lerno
Copy link
Collaborator

lerno commented Mar 9, 2025

This works for C/C++ because the conditional compilation happens before parsing. In C3 there is conditional compilation, but after parsing, so not all modifications to the language would even work.

But what you ran into is an anomaly. It's due to development of the intentionally breaking 0.7.0 release. During 0.6.x, everything has been compatible even when something was deprecated. But 0.7 is a break with the 0.6.x series. After 0.7.0, the next breaking release is 0.8.0. And to put this into perspective: 0.9 will be followed by 1.0.

This means 0.7 is one of the last breaking versions (0.9 -> 1.0 should not break any language constructs, so only 0.6.x -> 0.7.0 and 0.7.x -> 0.8.0 and 0.8.x -> 0.9.0 will be allowed breaking the backwards compatibility)

For this reason, this period when 0.7 is built will be significantly less nice in following latest than usual. For 0.6.x it's generally been smooth sailing using latest otherwise.

@lerno lerno added Discussion needed This feature needs discussion to iron out details Additional info please Further information is requested and removed Discussion needed This feature needs discussion to iron out details labels Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Additional info please Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants