binutils-gdb/gdb/testsuite/gdb.cp
Tom Tromey 007e153034 Handle alignof and _Alignof
This adds alignof and _Alignof to the C/C++ expression parser, and
adds new tests to test the features.  The tests are written to try to
ensure that gdb's knowledge of alignment rules stays in sync with the
compiler's.

2018-04-30  Tom Tromey  <tom@tromey.com>

	PR exp/17095:
	* NEWS: Update.
	* std-operator.def (UNOP_ALIGNOF): New operator.
	* expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
	New.
	* eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
	* c-lang.c (c_op_print_tab): Add alignof.
	* c-exp.y (ALIGNOF): New token.
	(exp): Add "ALIGNOF" production.
	(ident_tokens): Add _Alignof and alignof.

2018-04-30  Tom Tromey  <tom@tromey.com>

	PR exp/17095:
	* gdb.dwarf2/dw2-align.exp: New file.
	* gdb.cp/align.exp: New file.
	* gdb.base/align.exp: New file.
	* lib/gdb.exp (gdb_int128_helper): New proc.
	(has_int128_c, has_int128_cxx): New caching procs.
2018-04-30 11:25:31 -06:00
..
abstract-origin.cc
abstract-origin.exp
align.exp Handle alignof and _Alignof 2018-04-30 11:25:31 -06:00
ambiguous.cc
ambiguous.exp
annota2.cc
annota2.exp
annota3.cc
annota3.exp
anon-ns.cc
anon-ns.exp
anon-ns2.cc
anon-struct.cc
anon-struct.exp
anon-union.cc
anon-union.exp
arg-reference.cc
arg-reference.exp
baseenum.cc
baseenum.exp
bool.cc
bool.exp
breakpoint.cc
breakpoint.exp
bs15503.cc
bs15503.exp
call-c-1.c
call-c.cc
call-c.exp
casts.cc
casts.exp
casts03.cc
chained-calls.cc
chained-calls.exp
class2.cc
class2.exp
classes.cc
classes.exp
cmpd-minsyms.cc
cmpd-minsyms.exp
converts.cc
converts.exp
cp-relocate.cc
cp-relocate.exp Show line numbers in output for "info var/func/type" 2018-04-13 19:26:05 +02:00
cpcompletion.exp
cpexprs.cc
cpexprs.exp
cplabel.cc
cplabel.exp
cplusfuncs.cc
cplusfuncs.exp Show line numbers in output for "info var/func/type" 2018-04-13 19:26:05 +02:00
cpsizeof.cc
cpsizeof.exp
ctti.exp
cttiadd.cc
cttiadd1.cc
cttiadd2.cc
cttiadd3.cc
debug-expr.exp
demangle.exp
derivation.cc
derivation.exp
derivation2.cc
destrprint.cc
destrprint.exp
dispcxx.cc
dispcxx.exp
ena-dis-br-range.cc
ena-dis-br-range.exp
enum-class.cc
enum-class.exp
exception.cc
exception.exp
exceptprint.cc
exceptprint.exp
expand-psymtabs-cxx.cc
expand-psymtabs-cxx.exp
expand-sals.cc
expand-sals.exp
extern-c.cc
extern-c.exp
filename.cc
filename.exp
formatted-ref.cc
formatted-ref.exp
fpointer.cc
fpointer.exp
gdb1355.cc
gdb1355.exp
gdb2384-base.cc
gdb2384-base.h
gdb2384.cc
gdb2384.exp
gdb2495.cc
gdb2495.exp
hang.H
hang.exp
hang1.cc
hang2.cc
hang3.cc
impl-this.cc
impl-this.exp
includefile
infcall-dlopen-lib.cc
infcall-dlopen.cc
infcall-dlopen.exp
inherit.exp
iostream.cc
iostream.exp
koenig.cc
koenig.exp
local-static.c
local-static.cc
local-static.exp
local.cc
local.exp
m-data.cc
m-data.exp
m-static.cc
m-static.exp Fix type of values representing optimized out static members 2018-02-07 08:49:56 -05:00
m-static.h
m-static1.cc
maint.exp
mb-ctor.cc
mb-ctor.exp
mb-inline.exp
mb-inline.h
mb-inline1.cc
mb-inline2.cc
mb-templates.cc
mb-templates.exp
member-name.cc
member-name.exp
member-ptr.cc
member-ptr.exp
meth-typedefs.cc
meth-typedefs.exp
method.cc
method.exp
method2.cc
method2.exp
minsym-fallback-main.cc
minsym-fallback.cc
minsym-fallback.exp
minsym-fallback.h
misc.cc
misc.exp
namelessclass.S
namelessclass.cc
namelessclass.exp
namespace-enum-main.cc
namespace-enum.cc
namespace-enum.exp
namespace-nested-import.cc
namespace-nested-import.exp
namespace.cc
namespace.exp Show line numbers in output for "info var/func/type" 2018-04-13 19:26:05 +02:00
namespace1.cc
nested-types.cc
nested-types.exp
nextoverthrow.cc
nextoverthrow.exp
no-dmgl-verbose.cc
no-dmgl-verbose.exp
non-trivial-retval.cc
non-trivial-retval.exp
noparam.cc
noparam.exp
nsalias.cc
nsalias.exp
nsdecl.cc
nsdecl.exp
nsimport.cc
nsimport.exp
nsnested.cc
nsnested.exp
nsnoimports.cc
nsnoimports.exp
nsrecurs.cc
nsrecurs.exp
nsstress.cc
nsstress.exp
nsusing.cc
nsusing.exp
operator.cc
operator.exp
oranking.cc
oranking.exp
overload-const.cc
overload-const.exp
overload.cc
overload.exp
ovldbreak.cc
ovldbreak.exp
ovsrch.exp
ovsrch.h
ovsrch1.cc
ovsrch2.cc
ovsrch3.cc
ovsrch4.cc
paren-type.cc
paren-type.exp
parse-lang.cc
parse-lang.exp
pass-by-ref.cc
pass-by-ref.exp
pr-574.cc
pr-574.exp
pr-1023.cc
pr-1023.exp
pr-1210.cc
pr-1210.exp
pr9067.cc
pr9067.exp
pr9167.cc
pr9167.exp
pr9594.cc
pr9631.cc
pr9631.exp
pr10687.cc
pr10687.exp
pr10728-x.cc
pr10728-x.h
pr10728-y.cc
pr10728.exp
pr12028.cc
pr12028.exp
pr17132.cc
pr17132.exp
pr17494.cc
pr17494.exp
printmethod.cc
printmethod.exp
psmang.exp
psmang1.cc
psmang2.cc
psymtab-parameter.cc
psymtab-parameter.exp
ptype-cv-cp.cc
ptype-cv-cp.exp
ptype-flags.cc
ptype-flags.exp
punctuator.exp
re-set-overloaded.cc
re-set-overloaded.exp
readnow-language.cc
readnow-language.exp
ref-params.cc
ref-params.exp
ref-types.cc
ref-types.exp
rtti.exp
rtti.h
rtti1.cc
rtti2.cc
rvalue-ref-casts.cc
rvalue-ref-casts.exp
rvalue-ref-overload.cc
rvalue-ref-overload.exp
rvalue-ref-params.cc
rvalue-ref-params.exp
rvalue-ref-sizeof.cc
rvalue-ref-sizeof.exp
rvalue-ref-types.cc
rvalue-ref-types.exp
save-bp-qualified.cc
save-bp-qualified.exp
scope-err.cc
scope-err.exp
shadow.cc
shadow.exp
smartp.cc
smartp.exp
static-method.cc
static-method.exp
static-print-quit.cc
static-print-quit.exp
static-typedef-print.cc Fix infinite recursion when printing static member with typedef 2018-04-02 12:53:43 -05:00
static-typedef-print.exp Fix infinite recursion when printing static member with typedef 2018-04-02 12:53:43 -05:00
subtypes-2.cc Add psymbols for nested types 2018-03-23 11:58:32 -07:00
subtypes.cc Add psymbols for nested types 2018-03-23 11:58:32 -07:00
subtypes.exp Add psymbols for nested types 2018-03-23 11:58:32 -07:00
subtypes.h Add psymbols for nested types 2018-03-23 11:58:32 -07:00
temargs.cc
temargs.exp
templates.cc
templates.exp
try_catch.cc
try_catch.exp
typedef-operator.cc
typedef-operator.exp
typeid.cc
typeid.exp
userdef.cc
userdef.exp
using-crash.cc
using-crash.exp
var-tag-2.cc
var-tag-3.cc
var-tag-4.cc
var-tag.cc
var-tag.exp
virtbase.cc
virtbase.exp
virtfunc.cc
virtfunc.exp
virtfunc2.cc
virtfunc2.exp
vla-cxx.cc
vla-cxx.exp
watch-cp.cc Fix watching structs in C++ 2018-03-07 14:29:19 +01:00
watch-cp.exp Fix watching structs in C++ 2018-03-07 14:29:19 +01:00
wide_char_types.c
wide_char_types.exp