https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124529
Bug ID: 124529
Summary: bad reject of register declaration at top level
Product: gcc
Version: 15.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: jreiser at bitwagon dot com
Target Milestone: ---
Created attachment 63938
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63938&action=edit
pre-processed C source code (13kB)
Compiling the attached LzmaDecode.i for 32-bit x86 using "gcc -m32 -O2 -S
Lzmadecode.i" produces:
=====
LzmaDecode.c: In function ‘LzmaDecode’:
LzmaDecode.c:366:1: error: unsupported size for integer register
366 | }
| ^
=====
This is bad because the complaint is wrong, and because the
message omits necessary details.
See attached gcc-v.txt for the output on stderr of "gcc -v". Briefly:
gcc version 15.2.1 20260123 (Red Hat 15.2.1-7) (GCC)
running under Fedora 43 Linux on x86_64.
Explanation of complaint: First, all register declarations in the source
are for 'int' or 'unsigned', which are both valid sizes.
Thus the complaint "unsupported size" is wrong.
Second, the error message is missing all the necessary details.
The line number is wrong. The alleged unsupported size
(what the compiler believes) is not specified.
The symbol name in the alleged bad declaration is omitted.
In short, the message gives no clue about what is wrong or how to fix it.