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

pascal defined elsewhere #54

Closed
JaapAap opened this issue Feb 10, 2017 · 3 comments
Closed

pascal defined elsewhere #54

JaapAap opened this issue Feb 10, 2017 · 3 comments

Comments

@JaapAap
Copy link

JaapAap commented Feb 10, 2017

I just ran into the issue (on VS2015) that the header minwindef.h (that is pulled in from somewhere, not sure where) defines this:

#if (!defined(_MAC)) && ((_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED))
#define pascal __stdcall
#else
#define pascal
#endif

which obviously conflicts with defining pascal as a unit.

@nholthaus
Copy link
Owner

nholthaus commented Feb 10, 2017

my advice has been to #undef unused clashing macros before the inclusion of <units.h>. I #undef pascal in a bunch of my code (and haven't any issues).

I can at least add it to the list of known clashes (Edit: and have).

I'd be open to better ideas for dealing with the clashes, but renaming the units/abbreviations appeases half the user base and upsets the other half. Using _Te as the tesla abbreviation caused quite the controversy, but I didn't have a choice with that one because MSVC treats _T specially somehow and I couldn't #undef it.

The current prevailing thought is that standardization of units will hopefully render the problem obsolete in the mid term (with units winning).

@nholthaus nholthaus added this to the v2.3.0 milestone Feb 10, 2017
@nholthaus nholthaus mentioned this issue Feb 13, 2017
3 tasks
@MikeGitb
Copy link

I thought any identifier starting with _[Capital Letter] is reserved for use by the c++ implementation. Does that not apply to suffixes?

@nholthaus
Copy link
Owner

So I changed my mind and will pop the pascal macro in v2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants