public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug cli/17095] New: print alignof (type or expression)
@ 2014-06-26 22:04 mjw at redhat dot com
2014-11-25 0:16 ` [Bug cli/17095] " john.carter at taitradio dot com
0 siblings, 1 reply; 2+ messages in thread
From: mjw at redhat dot com @ 2014-06-26 22:04 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17095
Bug ID: 17095
Summary: print alignof (type or expression)
Product: gdb
Version: unknown
Status: NEW
Severity: normal
Priority: P2
Component: cli
Assignee: unassigned at sourceware dot org
Reporter: mjw at redhat dot com
It would be convenient if gdb supported alignof like it supports sizeof for a
type or expression.
GCC has had an GNU extension for it:
https://gcc.gnu.org/onlinedocs/gcc/Alignment.html
C++11 has a keyword alignof and C11 has _Alignof (with alignof when including
stdalign.h) both only work on a type, but as a GNU extension they also work on
expressions.
alignof has the same rules as sizeof, alignof on an array gives the alignment
of the element type, on a c++ reference type it gives the alignment of the
referenced type.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-25 0:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-26 22:04 [Bug cli/17095] New: print alignof (type or expression) mjw at redhat dot com
2014-11-25 0:16 ` [Bug cli/17095] " john.carter at taitradio dot com
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).