Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!clyde!watmath!watnot!water!akwright From: akwright@water.UUCP (Andrew K. Wright) Newsgroups: comp.lang.c++ Subject: aliasing in inline function calls Message-ID: <666@water.UUCP> Date: Sat, 6-Dec-86 15:43:13 EST Article-I.D.: water.666 Posted: Sat Dec 6 15:43:13 1986 Date-Received: Sun, 7-Dec-86 04:17:15 EST Distribution: comp Organization: U of Waterloo, Ontario Lines: 21 There appears to have been no attempt to detect aliasing among arguments to inline functions in C++. The following trivial program generates different results if the inline keyword is inserted where shown. Is this a known problem? Or worse yet, is this they way it is *supposed* to work? ---------------------------- #include int x; /* inline */ int f( int q, int *r ) { return x = ++(*r) && q; } main() { int a = 0; int *b = &a; printf( "%d\n", f( a, b ) ); }