mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 20:01:31 -05:00
/cp 2018-11-15 Paolo Carlini <paolo.carlini@oracle.com> * constexpr.c (ensure_literal_type_for_constexpr_object): Use DECL_SOURCE_LOCATION in error_at calls. /testsuite 2018-11-15 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/cpp0x/constexpr-diag3.C: Check locations too. * g++.dg/cpp0x/constexpr-ice19.C: Likewise. * g++.dg/cpp0x/constexpr-nonlit2.C: Likewise. * g++.dg/cpp1z/constexpr-lambda15.C: Likewise. * g++.dg/ext/constexpr-vla5.C: Likewise. * g++.dg/gomp/pr85134.C: Likewise. From-SVN: r266192
11 lines
211 B
C
11 lines
211 B
C
// PR c++/79461
|
|
// { dg-do compile { target c++14 } }
|
|
|
|
struct S {
|
|
constexpr S(int i) {
|
|
auto f = [i]{}; // { dg-error "10:variable .f. of non-literal type" "" { target c++14_only } }
|
|
}
|
|
};
|
|
int main() {}
|
|
|