quakeforge/tools/qfcc
Bill Currie 9ccfe8aefc [qfcc] Rewrite init_elements
The end goal was to fix erroneous non-constant initializer errors for
the following (ie, nested initializer blocks):

    typedef struct { int x; int y; } Point;
    typedef struct { int width; int height; } Extent;
    typedef struct Rect_s { Point offset; Extent extent; } Rect;
    Rect makeRect (int xpos, int ypos, int xlen, int ylen)
    {
	Rect rect = {{xpos, ypos}, {xlen, ylen}};
	return rect;
    }

However, it turned out that nested initializer blocks for local
variables did not work at all in that the relocations were lost because
fake defs were being created for the generated instructions.

Thus, instead of creating fake defs, simply record the offset relative
to the base def, the type, and the basic type initializer expression,
then generate instructions that all refer to the correct def but with a
relative offset.

Other than using the new element system, static initializers are largely
unaffected.
2020-03-05 11:05:13 +09:00
..
doc Allow constant initialized globals in advanced code 2020-02-23 22:51:00 +09:00
include [qfcc] Make reloc functions const-correct 2020-03-05 11:03:23 +09:00
source [qfcc] Rewrite init_elements 2020-03-05 11:05:13 +09:00
test [qfcc] Fix test that failed due to improved warnings 2020-03-05 11:04:22 +09:00
AUTHORS more mailing list corrections 2003-07-12 21:50:22 +00:00
bootstrap scary, but the only changes qfcc needed to build as part of quakeforge was 2002-01-22 05:48:03 +00:00
configure.in Replace system defines/includes with qfcc's 2020-02-19 02:35:09 +09:00
Makefile.am Add a test harness for qfcc. 2012-11-22 21:59:01 +09:00
TODO Throw away function parameter type alias info 2020-02-26 17:46:53 +09:00