You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think both "xend"s, below, should compile to the same thing (except, of
course, for the fact that they refer to different "x"s), which is what happens
in native gcc 3.3. Instead, the 2nd one, in "bar", gives us an error, as shown.
bar() is reduced from a function in f2c.
194 gally>
/home/vadve/lattner/local/x86/llvm-gcc/libexec/gcc/i686-pc-linux-gnu/3.4-llvm/cc1
-quiet foo.i
foo.i: In function `bar':
foo.i:8: error: initializer element is not constant
195 gally> cat foo.i
void foo () {
static char x[10];
static char *xend = &x[10];
}
void bar () {
static char x[10];
static char *xend = x + 10;
}