Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/init/pr43064-3.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 /* Verify that warnings about member initializers appear at the bad value, | |
2 rather than on the last token of the final initializer. */ | |
3 | |
4 // { dg-do compile } | |
5 // { dg-options "-Wconversion-null -fdiagnostics-show-caret" } | |
6 | |
7 #define NULL __null // { dg-warning "converting to non-pointer type 'int' from NULL" } | |
8 /* { dg-begin-multiline-output "" } | |
9 #define NULL __null | |
10 ^~~~~~ | |
11 { dg-end-multiline-output "" } */ | |
12 | |
13 class A | |
14 { | |
15 public: | |
16 A(); | |
17 bool m_bool; | |
18 int m_int; | |
19 void *m_ptr; | |
20 }; | |
21 | |
22 A::A() | |
23 : m_bool(NULL), | |
24 m_int(NULL), // { dg-message "in expansion of macro 'NULL'" } | |
25 m_ptr(NULL) | |
26 { | |
27 } | |
28 | |
29 /* { dg-begin-multiline-output "" } | |
30 m_int(NULL), | |
31 ^~~~ | |
32 { dg-end-multiline-output "" } */ |