public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/45881] New: bit offset of bitfields
@ 2010-10-04 13:59 wek at host dot sk
  2021-08-28  3:57 ` [Bug c/45881] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: wek at host dot sk @ 2010-10-04 13:59 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45881

           Summary: bit offset of bitfields
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: wek@host.sk


A (builtin) function, returning bit offset for bitfields within structs, could
be useful to pass bit "addresses" as function parameters.

In analogy to offsetof()/sizeof(), a similar function returning number of bits
of a bitfield could be created, too, although it would be less useful than the
offset.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/45881] bit offset of bitfields
  2010-10-04 13:59 [Bug c/45881] New: bit offset of bitfields wek at host dot sk
@ 2021-08-28  3:57 ` pinskia at gcc dot gnu.org
  2021-09-13 20:47 ` pinskia at gcc dot gnu.org
  2021-09-13 21:50 ` konfera at efton dot sk
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-28  3:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45881

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-08-28

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I thought I saw a paper about adding this and even bit sized types.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/45881] bit offset of bitfields
  2010-10-04 13:59 [Bug c/45881] New: bit offset of bitfields wek at host dot sk
  2021-08-28  3:57 ` [Bug c/45881] " pinskia at gcc dot gnu.org
@ 2021-09-13 20:47 ` pinskia at gcc dot gnu.org
  2021-09-13 21:50 ` konfera at efton dot sk
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-13 20:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45881

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2763.pdf

It seems like they did not add this ...

But they do have _Bitwidthof now ...

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/45881] bit offset of bitfields
  2010-10-04 13:59 [Bug c/45881] New: bit offset of bitfields wek at host dot sk
  2021-08-28  3:57 ` [Bug c/45881] " pinskia at gcc dot gnu.org
  2021-09-13 20:47 ` pinskia at gcc dot gnu.org
@ 2021-09-13 21:50 ` konfera at efton dot sk
  2 siblings, 0 replies; 4+ messages in thread
From: konfera at efton dot sk @ 2021-09-13 21:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45881

--- Comment #3 from Jan Waclawek <konfera at efton dot sk> ---
Thanks for the comments and the link.

Small embedded is generally frowned upon. The proposal is characteristically
heavyweight and unwieldy.

Maybe in C5x.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-13 21:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-04 13:59 [Bug c/45881] New: bit offset of bitfields wek at host dot sk
2021-08-28  3:57 ` [Bug c/45881] " pinskia at gcc dot gnu.org
2021-09-13 20:47 ` pinskia at gcc dot gnu.org
2021-09-13 21:50 ` konfera at efton dot sk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).