Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
WString: remove operator==(const __FlashStringHelper*) #8569
WString: remove operator==(const __FlashStringHelper*) #8569
Changes from 5 commits
e15fc91
a5cc344
e4b47bc
a02c21c
bc52bd6
b912a70
65ad698
fb666ef
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
just note that the trade-off is someone will write
obj == 5;
returning false positive :)(...and iirc ide default to 'no warnings', which does not help...)
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.
Given that
std::nullptr_t
is a distinguishable type, I tried the same withdecltype(NULL)
.Despite the existence of the
__null
internal keyword and the__sentinel__
attribute, I currently cannot manageNULL
separately from int/long.I reverted:
==(FlashStringHelper*)
is removed again.We still have this:
#define NULL nullptr
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 think they refer to some old version of GCC (pre 4.6?) with the
__null
stuff.And I'd like to find some examples of
#define NULL std::nullptr
, as it seems like something for the system header to haveThere 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.
The only one I could find that is installed on my workstation and probably rarely used(*).
(*)given
std::
andusing
are both lackingThere 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.
So we could've had this
https://github.com/gcc-mirror/gcc/blob/1815462a6e53465c404f8a5f6116891492d4b50b/gcc/ginclude/stddef.h#L396
But, newlib overrides it
https://github.com/earlephilhower/newlib-xtensa/blob/ebc967552ce827f21fc579fd8c437037c1b472ab/newlib/libc/include/stdlib.h#L60-L62
edit: ...need to check the preprocessor chain, though, but I would guess it overrides it
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.
Also, glibc code requesting it
https://code.woboq.org/userspace/glibc/stdlib/stdlib.h.html#_M/__need_NULL