gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

libobjc2: Dealing with non-constant initializers in sarray2.h included f


From: Ivan Vučica
Subject: libobjc2: Dealing with non-constant initializers in sarray2.h included from C files
Date: Tue, 6 Sep 2016 15:35:09 +0100

Cheers,

I'm fiddling with writing Bazel (http://www.bazel.io/) BUILD-files for libobjc2 (and, hopefully, other GS libraries). There are reasons why I'm doing this, but they're a separate discussion topic.

There's this:

In file included from dtable.h:3:0,
                 from category_loader.c:5:
sarray2.h: At top level:
sarray2.h:26:1: error: initializer element is not constant
 static const uint32_t data_mask = data_size - 1;
 ^
sarray2.h:55:8: error: variably modified 'data' at file scope
  void *data[data_size];
        ^


This is on GCC 4.8.4. I guess I can pass -x c++, but that feels wrong. Any suggestions?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]