[Bug middle-end/105654] transparent_union, function pointer and different types arguments causes null pointer to be passed

2022-05-20 Thread tobias at strongswan dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105654

Tobias Brunner  changed:

   What|Removed |Added

 CC||tobias at strongswan dot org

--- Comment #4 from Tobias Brunner  ---
Note that changing the macro so that instead of

  static typeof(_cb_parse)* parse = _cb_parse;

it declares the function like this

  static _Bool (*parse)(void*, char* in) = _cb_parse;

seems to fix the issue (see my update here:
https://github.com/strongswan/strongswan/issues/1053#issuecomment-1131356912).

[Bug ada/119265] New: unsigned __int128 not converted properly by -fdump-ada-spec, while __int128 is

2025-03-13 Thread tobias at strongswan dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119265

Bug ID: 119265
   Summary: unsigned __int128 not converted properly by
-fdump-ada-spec, while __int128 is
   Product: gcc
   Version: 15.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tobias at strongswan dot org
CC: dkm at gcc dot gnu.org
  Target Milestone: ---

Since 6.5, the Linux UAPI kernel header `linux/types.h` contains the following:


#ifdef __SIZEOF_INT128__
typedef __signed__ __int128 __s128 __attribute__((aligned(16)));
typedef unsigned __int128 __u128 __attribute__((aligned(16)));
#endif


Using `-fdump-ada-spec` to generate Ada specs from a header that includes this
results in:


subtype uu_s128 is Extensions.Signed_128;  -- /usr/include/linux/types.h:12

subtype uu_u128 is uu_int128_unsigned;  -- /usr/include/linux/types.h:13


So the second typedef with `unsigned __int128` is not mapped to
`Extensions.Unsigned_128` but a non-existent identifier, which results in an
error when compiling:


linux_types_h.ads:14:23: error: "uu_int128_unsigned" is undefined


Adding `#undef __SIZEOF_INT128__` before including `linux/types.h` (or a header
that includes it indirectly) may be used as a workaround.