Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
File List
Globals
EXTERNAL_HEADERS
RSL
etc
config
src
NO_FOR_LOCAL_SCOPE.cpp
Go to the documentation of this file.
1
// checking for scope of for-init-statements
2
3
25
int
foo
(
int
n
)
26
{
27
int
result
= 0;
28
29
// 6.5.3, p3, the scope of `i' extends to the end of
30
// the for-statement (and not beyond)
31
for
(
int
i
= 0;
i
!=
n
; ++
i
)
32
result
+=
i
;
33
34
// check to see if i is still in scope here
35
// if so, the test will compile succesfully
36
// indicating a failure
37
result
*=
i
;
38
39
return
result
;
40
}
i
#define i
Definition
17.names.cpp:126
n
#define n
Definition
17.names.cpp:130
result
volatile int result
Definition
18.limits.traps.stdcxx-624.cpp:35
foo
#define foo(buf, s,...)
Definition
VA_LIST_FUNC_MACRO.cpp:28
Generated by
1.9.8