Add _Complex type support to C parser
authorTom Tromey <tom@tromey.com>
Wed, 1 Apr 2020 20:09:52 +0000 (14:09 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 1 Apr 2020 20:09:53 +0000 (14:09 -0600)
commit3638a098a21ce706ef2b17185f3b165e4f9a5c54
tree2e28dcfa81cff0a6b027e967326e75802440f660
parentc34e87146628a14cf662dca46aac893d06502f52
Add _Complex type support to C parser

This changes the C parser to add support for complex types in casts.

gdb/ChangeLog
2020-04-01  Tom Tromey  <tom@tromey.com>

* c-exp.y (FLOAT_KEYWORD, COMPLEX): New tokens.
(scalar_type): New rule, from typebase.
(typebase): Use scalar_type.  Recognize complex types.
(field_name): Handle FLOAT_KEYWORD.
(ident_tokens): Add _Complex and __complex__.

gdb/testsuite/ChangeLog
2020-04-01  Tom Tromey  <tom@tromey.com>

* gdb.base/complex-parts.exp: Add type tests.
gdb/ChangeLog
gdb/c-exp.y
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/complex-parts.exp