repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
aarch64/testsuite: Fix if-compare_2.c for removing vcond{,u,eq} patterns [PR116041]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.jason
/
warning5.C
blob
006713c03358d9fd79afb2c0539b602ca1b94bc3
1
// { dg-do run }
2
// { dg-options "-Wall" }
3
// PRMS Id: 5135
4
// Bug: g++ complains that the result of the new expression is not used.
5
6
extern "C" int printf (const char *, ...);
7
inline void * operator new (__SIZE_TYPE__, void *p) { return p; }
8
9
class foo {
10
public:
11
foo() : a(42) {};
12
int a;
13
};
14
15
int
16
main()
17
{
18
char buffer[1024];
19
20
new (buffer) foo;
21
22
foo* pY = (foo *)buffer;
23
24
return pY->a != 42;
25
}