c/10406: Suggestion for variable attribute "default"
Benjamin Kalytta
bkausbk@web.de
Mon Apr 14 21:46:00 GMT 2003
>Number: 10406
>Category: c
>Synopsis: Suggestion for variable attribute "default"
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: support
>Submitter-Id: net
>Arrival-Date: Mon Apr 14 21:46:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Benjamin Kalytta <bkausbk@web.de>
>Release: VERSION INDEPENDENT
>Organization:
>Environment:
EVERYTHING
>Description:
This is a suggestion for extending gcc syntax.
There should be "default" variable attribute.
Example:
typedef union _CPU_REG_64{
long long int QW __attribute__((default));
long int DW[2]
short int W[4];
char HW[8]
} CPU_REG_64;
CPU_REG_64 Reg;
Reg=0x1234567890abcdef;
would be the same as ...
Reg.QW=0x1234567890abcdef;
because QW is defined as "default".
Only one "deafult" variable could be assigned within a struct/union.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list