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

Deprecate pascal #285

Merged
merged 1 commit into from
Aug 12, 2024
Merged

Deprecate pascal #285

merged 1 commit into from
Aug 12, 2024

Conversation

chiphogg
Copy link
Contributor

@chiphogg chiphogg commented Aug 12, 2024

It conflicts with the pascal macro in <Windows.h>. Yes, they really
did define a lowercase-named macro in <Windows.h>.

As with PI (#247), the #ifndef should immediately unblock most
users, but it's not a long-term solution, because it depends on
order-of-includes. Therefore, we also deprecate pascal (as with PI
in #250). I think a good rule of thumb is that deprecated constructs
should be deprecated for at least one full minor release cycle, so we'll
plan to delete it (along with PI) as part of 0.5.0.

Fixes #284.

It conflicts with the `pascal` macro in `<Windows.h>`.  Yes, they really
did define a lowercase-named macro in `<Windows.h>`.

As with `PI` (#247), the `#ifndef` should immediately unblock most
users, but it's not a long-term solution, because it depends on
order-of-includes.  Therefore, we also deprecate `pascal` (as with `PI`
in #250).  I think a good rule of thumb is that deprecated constructs
should be deprecated for at least one full minor release cycle, so we'll
plan to delete it (along with `PI`) as part of 0.5.0.

Fixes #284.
@chiphogg chiphogg added the release notes: 🗑️ lib (deprecation) PR deprecating library functionality label Aug 12, 2024
@chiphogg chiphogg requested a review from geoffviola August 12, 2024 14:17
Copy link
Contributor

@geoffviola geoffviola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workaround seems reasonable.

I couldn't find a way to turn off that macro in minwindef.h. It looks like this workaround is enough for us to compile the all units file on Windows: compiler explorer. 🎉

@chiphogg chiphogg merged commit f267ebc into main Aug 12, 2024
11 checks passed
@chiphogg chiphogg deleted the chiphogg/dep-pascal#284 branch August 12, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release notes: 🗑️ lib (deprecation) PR deprecating library functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

All-units prebuilt header error on pascal on MSVC
2 participants