int period = driver->period_size;
jack_position_t *position = &driver->engine->control->current_time;
gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> On Sat, 2007-12-15 at 15:17 +0100, Pieter Palmers wrote:
> > Is there any reason not to make this a #define?
> none. although I am strongly convinced that gcc is in error here.
It isn't. Variables aren't considered compile-time constants, even if
they have the "const" qualifier.
The "leaf nodes" of an initialiser expression are limited to literals,
enumeration constants and the values returned by the unary "&" and
Also, in C89 the "const" qualifier can only be applied to arrays or
pointer targets, so "const int foo" isn't valid. In C99, "const" can
be applied to variables or other lvalues, making it an error to modify
them, but it doesn't make them into compile-time constants.