[Vala] Const declaration after use
- From: Andy Lees <andrewl oz gmail com>
- To: Vala List <vala-list gnome org>
- Subject: [Vala] Const declaration after use
- Date: Thu, 30 Apr 2015 12:42:36 +1000
Hi,
I had thought that the following issue with declaration order (variables vs
#defines) in the generated C code had been fixed a while ago, but I seem to
be having the old problem:
Code:
public enum AnEnum {
LEVEL_UP, //
SIZE // for array sizing
}
const int AnEnumSize = (int)AnEnum.SIZE;
int64 *ptrs2[AnEnumSize];
Result:
/tmp/arr2.vala.R3EBYX.c:20:22: error: ‘AnEnumSize’ undeclared here (not in
a function)
extern gint64* ptrs2[AnEnumSize];
^
error: cc exited with status 256
Using 0.26.2
Perhaps I am recalling the existence of the fix incorrectly?
I can work around with a dynamic array, but given the static nature of the
declaration, I'd prefer not to.
Regards,
Andrew Lees
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]