This is the mail archive of the gdb-prs@sourceware.org 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]

[Bug c++/20399] New: casts.cc test case fails to compile


https://sourceware.org/bugzilla/show_bug.cgi?id=20399

            Bug ID: 20399
           Summary: casts.cc test case fails to compile
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: normal
          Priority: P2
         Component: c++
          Assignee: unassigned at sourceware dot org
          Reporter: tromey at sourceware dot org
  Target Milestone: ---

I noticed this when running some tests:

gdb compile failed,
/home/tromey/gdb/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.cp/casts.cc:40:10:
error: expected primary-expression before 'int'
 decltype(int x)
          ^~~
/home/tromey/gdb/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.cp/casts.cc:40:10:
error: expected ')' before 'int'
/home/tromey/gdb/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.cp/casts.cc:40:1:
error: expected unqualified-id before 'decltype'
 decltype(int x)
 ^~~~~~~~
/home/tromey/gdb/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.cp/casts.cc:
In function 'int main(int, char**)':
/home/tromey/gdb/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.cp/casts.cc:59:14:
error: expected primary-expression before 'decltype'
   double y = decltype(2);
              ^~~~~~~~


Maybe this needs a specific -std= option.
Or maybe this odd bit can just be removed without too much harm.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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