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
c: Implement C23 nullptr (N3042)
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
c2x-nullptr-5.c
blob
27803f7d03fc06b17432c7537a44711a08c53a3a
1
/* Test that we don't lose side-effects when converting from nullptr_t. */
2
/* { dg-do run } */
3
/* { dg-options "-std=c2x -pedantic-errors" } */
4
5
int
i
;
6
nullptr_t
fn
() { ++
i
;
return
nullptr
; }
7
8
int
9
main
()
10
{
11
int
*
p
=
fn
();
12
if
(
i
!=
1
)
13
__builtin_abort
();
14
}