home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
lclint.zip
/
lclint-2_3h-os2-bin.zip
/
test
/
argorder4.c
< prev
next >
Wrap
Text File
|
1997-09-03
|
483b
|
40 lines
int glob;
int add(int x, int y) { return (x + y); }
int f()
{
return (glob);
}
int g()
{
return (++glob);
}
int h()
{
if (f() > 3)
{
return (f() + g()); /* bad --- order of evaluation matters! */
}
else
{
if (g() < 2)
{
return (f() + (++glob)); /* bad! */
}
else
{
return (g() + h()); /* bad (twice) */
}
}
/* unreachable code here */
return (add ((printf("hullo"), 3), (printf("goodbye"), 4))); /* bad (wrice) */
}