mjw at redhat dot com
2014-06-26 22:04:05 UTC
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.
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.
You are receiving this mail because:
You are on the CC list for the bug.