ty: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: tbaeder at redhat dot com
Target Milestone: ---
Using gcc 8.3.1 and the following sample code:
static int use_float(float *f) {
return (int)*f;
}
// Type your code her
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90219
--- Comment #2 from Timm Bäder ---
(In reply to Jonathan Wakely from comment #1)
> Well if you took the address you wouldn't need to cast it to (float*)
Sure, this was just a dumbed-down version of the original code.
Priority: P3
Component: other
Assignee: unassigned at gcc dot gnu.org
Reporter: tbaeder at redhat dot com
Target Milestone: ---
The include/libiberty.h file has a check before declaring asprintf:
#if defined(HAVE_DECL_ASPRINTF) && !HAVE_DECL_ASPRINTF
ex
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90219
Timm Bäder changed:
What|Removed |Added
Resolution|--- |FIXED
Status|NEW
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98733
--- Comment #1 from Timm Bäder ---
I looked into this problem again and I think a potential fix could be as easy
as...
commit b95eed1938403874be927d4c25b8bbf88ed686ce (HEAD -> master)
Author: Timm Bäder
Date: Mon May 10 09:33:26 2021 +0200
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tbaeder at redhat dot com
Target Milestone: ---
See this example code:
typedef __UINTPTR_TYPE__ uintptr_t;
constexpr uintptr_t A = __builtin_bit_cast(uintptr_t, nullptr);
static_assert(A
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117727
--- Comment #4 from Timm Bäder ---
(In reply to Jakub Jelinek from comment #2)
> I thought all the bits of the type are padding bits (given that reads of
> std::nullptr_t typed objects just don't read any of the bits and simply
> result in null
iority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tbaeder at redhat dot com
Target Milestone: ---
See: https://godbolt.org/z/fnPn844oY
constexpr int (*p1)[0] = 0, (*p2)[0] = 0;
constexpr int k2 = p2 - p1;
prints:
:4:23: error: arithmetic on pointer t