-
Notifications
You must be signed in to change notification settings - Fork 601
Add name Perl_assert_; Convert __ASSERT_() calls to assert_() #23573
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
Conversation
|
https://github.com/search?q=%22define+__assert_%28%22&type=code 133 hits with current/old macro https://github.com/search?q=%22define+assert_%28%22&type=code 696 hits with future proposed macro the new preferred macro has much higher chance of a collision with 3rd party C headers update: Although a C compiler vendor should be calling the actual proc termination func
I have a suspicion this is a popular, not that brilliant choice, either in the past, or current, for C compiler authors, or random C library code bases.
|
|
@mauke so as a professional developer, did you analyze which spelling of the token has the least likely hood of conflicts with 3rd party headers or not? |
The
|
Yes, it's |
|
As a factoid, |
2e6cda0 to
57be7d7
Compare
This is a long name equivalent to assert_().
The former symbol is undefined behavior in C and C++.
57be7d7 to
6b925e8
Compare
|
I think it is best to not use |
tonycoz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested with VS2017 to see if we got any macro "space overflow" errors and didn't see any.
VS2015 failed to build I think due to an incompatibility with the windows 10 SDK:
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(316): warning C4013: '_mm_loadu_si64' undefined; assuming extern returning int
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(316): error C2440: 'initializing': cannot convert from 'int' to '__m128i'
(I just used the normal x64 native tools command prompt shortcut)
Perl_assert_is a long name forassert. The name__ASSERT_is undefined behavior in C and C++.