[Bug c/90219] New: Wrong source location for "cannot convert to a pointer type" warning

2019-04-24 Thread tbaeder at redhat dot com
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

[Bug c/90219] Wrong source location for "cannot convert to a pointer type" warning

2019-04-25 Thread tbaeder at redhat dot com
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.

[Bug other/98733] New: libiberty (v)asprintf checks do not work if asprintf() is a macro

2021-01-18 Thread tbaeder at redhat dot com via Gcc-bugs
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

[Bug c/90219] Wrong source location for "cannot convert to a pointer type" warning

2021-05-05 Thread tbaeder at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90219 Timm Bäder changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Bug other/98733] libiberty (v)asprintf checks do not work if asprintf() is a macro

2021-05-10 Thread tbaeder at redhat dot com via Gcc-bugs
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

[Bug c++/117727] New: __builtin_bit_cast with target type nullptr_t unimplemented

2024-11-21 Thread tbaeder at redhat dot com via Gcc-bugs
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

[Bug c++/117727] __builtin_bit_cast with target type nullptr_t unimplemented

2024-11-21 Thread tbaeder at redhat dot com via Gcc-bugs
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

[Bug c++/119567] New: "unknown operator" in pointer subtraction diagnostic

2025-04-01 Thread tbaeder at redhat dot com via Gcc-bugs
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