doc: Document struct-layout-1.exp for ABI checks
[official-gcc.git] / gcc / testsuite / g++.dg / init / pr43064-3.C
blob36726a86c34da82db90917c2327cc31ae786f165
1 /* Verify that warnings about member initializers appear at the bad value,
2    rather than on the last token of the final initializer.  */
4 // { dg-do compile }
5 // { dg-options "-Wconversion-null -fdiagnostics-show-caret" }
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 "" } */
13 class A
15 public:
16   A();
17   bool m_bool;
18   int m_int;
19   void *m_ptr;
22 A::A()
23   : m_bool(NULL),
24     m_int(NULL), // { dg-message "in expansion of macro 'NULL'" }
25     m_ptr(NULL)
29 /* { dg-begin-multiline-output "" }
30      m_int(NULL),
31            ^~~~
32    { dg-end-multiline-output "" } */