[Issue 4937] New: std.bitmanip: Allow repeated (identical) bitfield declarations

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Sep 24 18:07:36 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4937

           Summary: std.bitmanip: Allow repeated (identical) bitfield
                    declarations
           Product: D
           Version: D2
          Platform: All
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: ah08010-d at yahoo.com


--- Comment #0 from Austin Hastings <ah08010-d at yahoo.com> 2010-09-24 18:06:53 PDT ---
I'm trying to describe an opcode layout - the arrangement of bits used by a CPU
- and the resulting description is generally a union of bitfields:

opcode, displacement
opcode, register, register, register
opcode, constant
...etc

In my case, the opcode represents a common prefix, which leaves me declaring
something like this in D:

opcode, displacement
    "", register, register, register
    "", constant

I would prefer, for reasons of clarity, to be able to repeat the declaration of
opcode - the best comment is source code, as it were.

So I would like the bitmanip code to permit redeclaration of bitfields that are
identical in all respects.

That is, obviously the names are the same, but the field width, offset, and
type representation has to be the same as well.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list