This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [testsuite patch] Fix false FAIL in gdb.cp/casts.exp

On 09/11/2016 03:10 PM, Jan Kratochvil wrote:
> --- a/gdb/testsuite/gdb.cp/casts.exp
> +++ b/gdb/testsuite/gdb.cp/casts.exp
> @@ -112,7 +112,7 @@ gdb_test "print reinterpret_cast<A &> (*b)" " = \\(A \\&\\) @$hex: {a = 42}" \
>  # Test that keyword shadowing works.

This comment suggests that the test actually uses decltype on purpose.

> -gdb_test "whatis decltype(5)" " = double"
> +gdb_test "whatis int_to_double(5)" " = double"

Seems to be exercising the FLAG_SHADOW bits:

    {"__typeof__", TYPEOF, OP_TYPEOF, 0 },
    {"__typeof", TYPEOF, OP_TYPEOF, 0 },
    {"typeof", TYPEOF, OP_TYPEOF, FLAG_SHADOW },
    {"__decltype", DECLTYPE, OP_DECLTYPE, FLAG_CXX },

/* This is used to associate some attributes with a token.  */

enum token_flag
  /* If this bit is set, the token is conditional: if there is a
     symbol of the same name, then the token is a symbol; otherwise,
     the token is a keyword.  */


So perhaps a better fix is to move that particular test to a
separate testcase that force-compiles with -std=c++03.

Adding Tromey, who wrote the test initially.

Pedro Alves

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]