https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114779
Georg-Johann Lay changed:
What|Removed |Added
Keywords||documentation
--- Comment #10 from G
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114779
--- Comment #9 from Georg-Johann Lay ---
When this PR won't be fixed, then maybe at least the documentation could
clarify how to port macros to inline functions.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114779
--- Comment #8 from Richard Biener ---
I tried removing the TREE_SIDE_EFFECTS check at some point and it had quite
some fallout even in the testsuite. Don't remember the PR I tried this for ...
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114779
Jan Hubicka changed:
What|Removed |Added
CC||hubicka at gcc dot gnu.org
--- Comment #7
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114779
--- Comment #6 from Georg-Johann Lay ---
Recognizing more __builtin_constant_p situations is a good thing, IMO.
It would allow to transition from macros to inline functions in such
situations, for example in inline asm that has extra opcodes fo
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114779
--- Comment #5 from Jakub Jelinek ---
It isn't about side-effects. It is about it having pointer type.
If you change your testcase to
uintptr_t psfr_int = (uintptr_t) psfr;
if (! __builtin_constant_p (psfr_int))
then it will
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114779
--- Comment #4 from Georg-Johann Lay ---
As far as I understand, & SFR has no side effects.
But when it is used as argument to an (inline) function, then it does have side
effects?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114779
--- Comment #3 from Jakub Jelinek ---
But in that case the POINTER_TYPE_P case doesn't trigger, because it is
INTEGER_CST and
so
/* If we know this is a constant, emit the constant of one. */
if (CONSTANT_CLASS_P (arg)
|| (TREE_CODE (
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114779
--- Comment #2 from Georg-Johann Lay ---
Notice that when &SFR is used directly in __builtin_constant_p without an
inline function, then the code works as expected:
int main (void)
{
if (__builtin_constant_p (& SFR))
__asm (".warnin
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114779
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #1
10 matches
Mail list logo