view gcc/testsuite/g++.dg/diagnostic/missing-typename.C @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
line wrap: on
line source

// fix-it hint for missing "typename" (PR c++/63392)
// { dg-do compile { target c++17_down } }
// { dg-options "-fdiagnostics-show-caret" }

template<typename T>
class test_1 {
  T::type x; // { dg-error "need 'typename' before 'T::type' because 'T' is a dependent scope" }
  /* { dg-begin-multiline-output "" }
   T::type x;
   ^
   typename 
     { dg-end-multiline-output "" } */
};