[Debian-lego-team] FYI: GCC 15 appears to generate faulty h8300-hitachi-coff cross-compiler binaries
Petter Reinholdtsen
pere at hungry.com
Sun Jul 13 10:03:15 BST 2025
[Matthew Sheets]
> The "conftest.cc" file:
> struct S { ~S(); };
> void bar();
> void foo()
> {
> S s;
> bar();
> }
Looking at the code, I see old C style prototypes with C++ features.
Perhaps it work better when moving to more modern C style, like this:
struct S { ~S(void); };
void bar(void);
void foo(void)
{
struct S s;
bar();
}
The original file return this when compiled with gcc 12.2.0:
x.c:1:12: error: expected specifier-qualifier-list before ‘~’ token
1 | struct S { ~S(); };
| ^
x.c: In function ‘foo’:
x.c:5:4: error: unknown type name ‘S’; use ‘struct’ keyword to refer to the type
5 | S s;
| ^
| struct
The new edition still fail with gcc
x.c:1:12: error: expected specifier-qualifier-list before ‘~’ token
1 | struct S { ~S(void); };
| ^
but build just with with c++.
What exactly is the code trying to test?
--
Happy hacking
Petter Reinholdtsen
More information about the Debian-lego-team
mailing list