Bill Currie
5798c9d67a
wasn't catching the precedence inversion in (x - x & y) even though it was caught for (x & y - x).
2007-05-08 02:54:50 +00:00
Bill Currie
3deee307a8
check for uninitialized variables in return statements
2007-04-28 08:48:01 +00:00
Bill Currie
52d178b3be
Add a code generation option, "local-merging", to control qfcc's merging of local variable blocks into one block. Defaults to on for advanced mode and off for traditional.
2007-04-10 13:00:21 +00:00
Bill Currie
966c337bf5
use the def's declaration line rather than the function's when reporting auto-initialization
2007-04-06 11:05:52 +00:00
Bill Currie
04765083aa
really warn only once for each uninitialized variable
2007-04-06 08:56:37 +00:00
Bill Currie
5a8143a9c7
support float = vector and vector = float for traditional
2007-04-06 08:23:07 +00:00
Bill Currie
72af804b31
nested include reporting
2007-03-31 15:27:36 +00:00
Bill Currie
904197c70e
allow assignment of arrays to poitners
2006-12-11 09:26:45 +00:00
Bill Currie
728dde167d
explicity state errors are errors rather than leaving it implicit (tracking
...
gcc's messages again;)
2005-08-17 23:05:10 +00:00
Bill Currie
3fb03fc2be
hah, should have been using __attribute__((used)) all that time (rather
...
than __attribute__((unused))). fixes the missing console in -x11
2005-08-04 15:27:09 +00:00
Bill Currie
66cabb587f
add the vector-calls "optimisation" from fteqcc. makes it possible to
...
compile the version of frogbot with waypoints for almost 300 maps.
2005-06-10 07:31:25 +00:00
Bill Currie
554f4d071a
get the type right when accessing arrays in a struct (in a pointer?)
...
This is an imperfect revision of history.
2004-11-13 13:22:30 +00:00
Bill Currie
66257e3a88
run in fear, function overloading is here
...
This is an imperfect revision of history.
2004-11-13 11:50:00 +00:00
Bill Currie
9b81bc5ea6
allow access to the parameter type via @param and variable initializers for local arrays/structs.
...
This is an imperfect revision of history.
2004-11-13 04:02:00 +00:00
Bill Currie
4d044bfea4
make entity.vector.x work properly by making relative field offset work. also don't emit a field def for the resulting immediate
...
This is an imperfect revision of history.
2004-11-12 10:49:00 +00:00
Bill Currie
abf25e0e1c
real fix for uninitialized functions
...
This is an imperfect revision of history.
2004-11-12 05:04:00 +00:00
Bill Currie
b35561504c
do proper selector registration. unfortunatly, I discovered I'd created pr_method_t incorrectly and so had to bump the progs version again
...
This is an imperfect revision of history.
2004-11-10 05:37:00 +00:00
Bill Currie
a3a2dd62e3
fix type of "self"
...
This is an imperfect revision of history.
2004-11-02 07:13:00 +00:00
Jeff Teunissen
b057b6cb26
Some signed/unsigned formatting stuff found by lint.
2004-04-27 23:17:41 +00:00
Bill Currie
14900bb82e
fast-float code option (defaults to on). kills almost 3000 statements from
...
prozac
2004-04-27 20:24:37 +00:00
Bill Currie
9a3acc8035
get the field offset correctly
2004-04-09 04:30:19 +00:00
Bill Currie
7b28c555ba
quaternion field access now works
2004-04-09 04:12:44 +00:00
Bill Currie
4c4f40f137
fix a few bugs. basics seem to be working
2004-04-08 05:13:24 +00:00
Bill Currie
5869cb693e
oops
2004-04-08 05:04:50 +00:00
Bill Currie
a7103c6732
quaternion conjugate
2004-04-08 04:59:10 +00:00
Bill Currie
4882005a49
compile fixes (oops) and start working on quaternion support in qfcc
2004-04-08 02:33:20 +00:00
Bill Currie
14e8bfe94b
auto-init for uninitialized locals in traditional mode as requested by
...
Grievre
2004-02-21 05:52:05 +00:00
Bill Currie
0360859a0f
all warnings (except for @self and self) are now fully controllable
2004-02-17 00:39:21 +00:00
Bill Currie
c3f41e3e69
new opcode: state.f. same as state, but takes a 3rd float operand to
...
specify the step for calculating nextthink. accessed using
[frame, think, step] (state is [frame, think])
2004-02-11 01:43:33 +00:00
Bill Currie
1181fb267b
don't seg when constants are involved in && or || expressions
2004-02-09 02:23:37 +00:00
Bill Currie
f70605f5f7
ensure a op= b treats b as if it was (b)
2004-02-08 05:28:30 +00:00
Bill Currie
1d800caab7
make autoconvertion work for return
2004-02-06 08:40:28 +00:00
Bill Currie
d02b0686b1
don't seg if the method can't be found
2004-02-04 06:31:12 +00:00
Bill Currie
c43950abd8
autoconvert for function parameters now works :)
2004-02-04 05:49:54 +00:00
Bill Currie
892e80938b
that made a royal mess :(
2004-02-04 04:49:46 +00:00
Bill Currie
b2474a2b97
better auto-conversion of function parameters (ugh, this is getting messy
...
:( )
2004-02-04 04:33:08 +00:00
Bill Currie
f79e34628b
broke returning NIL
2004-02-04 02:30:18 +00:00
Bill Currie
ab4f0e7ca9
warn on return foo (); where foo returns void
2004-02-04 01:30:12 +00:00
Bill Currie
f05be31cae
fix for perc = itof (perc_val) / (100 / itof (size));
...
ie, better detection of function calls in binary expressions
2004-01-31 04:11:45 +00:00
Bill Currie
f8ed454547
warn on if (a = b)
2004-01-25 21:45:07 +00:00
Bill Currie
7423ee389d
better timing for constant folding
2004-01-25 21:36:44 +00:00
Bill Currie
51b0a66ac7
better constant folding with auto-conversion between scalar types (might
...
make that optional for non-constants)
2004-01-25 08:55:03 +00:00
Bill Currie
8f440c7911
linker.c:
...
I think I found the real reason doxygen gets confused
expr.c:
add a check for x & y == 2 (or similar) doesn't work for constant y at
the moment.
2004-01-22 01:04:48 +00:00
Bill Currie
2f21926568
more constant folding
2004-01-21 21:58:34 +00:00
Bill Currie
bb4e9de0db
fix a real oopsie with if (const)
2003-11-16 07:17:18 +00:00
Bill Currie
834ab26be5
remove some buggy debug code :P
2003-10-27 21:48:13 +00:00
Bill Currie
63414ea836
more gccisms in the error reporting (In function ...)
2003-10-25 04:35:47 +00:00
Bill Currie
58d0f188f1
recover from errors in bool expressions (ie, don't segfault)
2003-10-24 22:23:56 +00:00
Bill Currie
c76282c668
fix bools in function calls
2003-10-22 16:49:57 +00:00
Bill Currie
5f97de56d1
fix a few bugs
2003-10-22 09:14:53 +00:00
Bill Currie
969dad87eb
fix a secfault in return_expr
2003-10-22 08:30:54 +00:00
Bill Currie
72ae59f882
short circuit logic can now be controlled (see man page)
2003-10-22 08:27:38 +00:00
Bill Currie
945006494f
short circuit logic for && and || (as per C). forces standard precedence
...
(ie, breaks --traditional) when enabled (no choice at the moment, next fix)
2003-10-22 08:05:17 +00:00
Bill Currie
91207c0180
make void functions actually return float in traditional mode (qcc allowed
...
things like foo = void_function)
2003-09-23 16:57:53 +00:00
Bill Currie
387464a27c
mangle precedence of = relative to && and || for --traditional (bletch).
...
also make noise when assigning to bad lvalues (eg !x = y)
2003-09-23 16:42:03 +00:00
Bill Currie
ba26628b80
--traditional now "fixes" (ie, breaks) operator precedence to match qcc
...
except for the relationship between "=" and "&&" and "||": not sure I want
to go that far towards bug compatability.
2003-09-22 22:15:31 +00:00
Bill Currie
11538d4745
access arrays in structs more efficiently (especially when using constant
...
indeces)
2003-09-02 17:41:16 +00:00
Bill Currie
6086aa2b99
allow casts between pointers and integers
2003-08-24 08:03:25 +00:00
Bill Currie
385a90e8fb
correct pr_symtab_t to include the pointer to the array of selectors used
...
in the module. Unfortunatly, this requires a version bump on both qfo and
progs files due to the changes structure layout.
2003-08-23 06:15:19 +00:00
Bill Currie
b38486d405
make rel_def_op work properly
2003-08-22 19:48:14 +00:00
Bill Currie
d20b8bf0c1
pass NIL though ... safely
2003-08-22 06:04:31 +00:00
Bill Currie
204243fe95
better message type checking
2003-08-22 05:26:47 +00:00
Bill Currie
febc57e71b
typecheck message params when possible
2003-08-22 04:08:33 +00:00
Bill Currie
11c7c27f70
better relocations: pointers to structure members now work
2003-08-21 02:21:30 +00:00
Bill Currie
a2300387de
fix a bunch of segfaults
2003-08-20 22:36:02 +00:00
Bill Currie
93cafe878a
convert NIL properly in function calls
2003-08-20 20:28:28 +00:00
Bill Currie
7d830ffc1f
make @defs work properly and don't do uninitialized checks on structs
2003-08-20 19:58:41 +00:00
Bill Currie
aa712c0169
make [super foo] work in category methods
2003-08-18 06:11:41 +00:00
Bill Currie
329c91fce4
expr.c:
...
qcc actually had the precedence of "!x && y" correct, so don't invert
the logic for it in traditional code.
qfcc.c:
allow the .debug_file def to be emitted in traditional mode.
2003-08-05 17:48:16 +00:00
Bill Currie
dd9ab1e050
get unsigned mostly working
2003-08-01 21:20:04 +00:00
Bill Currie
ab94498503
heh, that was a symptom. forget &void :)
2003-07-30 21:55:32 +00:00
Bill Currie
8099f0d8f2
handle addresses of void defs
2003-07-30 20:57:50 +00:00
Bill Currie
6ecb707257
revamp the struct system so "struct foo;" does the right thing (ala C)
2003-07-30 04:11:45 +00:00
Bill Currie
5b9b11241b
make method lookup work with id
2003-07-29 17:38:29 +00:00
Bill Currie
8966b0a533
get -/+ into selector name for "does not respond to" warning.
2003-07-27 19:47:14 +00:00
Bill Currie
778cd78c35
fix some namespace issues with names both being a field and an ivar
2003-07-23 18:28:31 +00:00
Bill Currie
dedb2fa6bf
get [super ...] working correctly
2003-05-15 05:58:31 +00:00
Bill Currie
094c9c5cdb
make derefencing a pointer without an offset more efficient
2003-05-13 19:49:23 +00:00
Bill Currie
f59f766af1
use the correct type when taking the address of a pointer derefernece
2003-05-13 19:42:14 +00:00
Bill Currie
6fb5acc868
more auto-inline avoidance
2003-05-07 02:45:17 +00:00
Bill Currie
b6b5089ccc
add a "nosave" flag to defs making it easier to make defs that don't get
...
saved automaticly
2003-04-25 17:00:22 +00:00
Bill Currie
57254e5d33
fix a double ;
2003-04-23 06:17:36 +00:00
Bill Currie
8b24578547
print the operator for the precedence notice properly
2003-04-23 01:56:44 +00:00
Bill Currie
f7d806e8d5
can now handle > vector sized parameters
2003-04-22 20:11:16 +00:00
Bill Currie
2f6fc5d80c
general revamp so params and the return value use proper defs rather than
...
hardcoded locations. this will allow use of quaternions in the future.
2003-04-22 15:29:32 +00:00
Bill Currie
eb099ae0d3
make qf gcc 3.3 clean
2003-04-17 00:01:48 +00:00
Bill Currie
55eb6c3ab1
plug a memory leak
2003-04-07 18:30:47 +00:00
Bill Currie
ee821705cc
implement nested (and struct) block initializers
2003-04-07 17:44:18 +00:00
Bill Currie
87a31439e4
don't warn for ! precedence
2003-03-25 17:47:52 +00:00
Bill Currie
0550741fb9
catch ! == bogosity
2003-03-25 17:18:58 +00:00
Bill Currie
15781b2f19
make vector.x work in classes work and don't give an uninitialized warning
...
for vec.x = 0;
2003-03-12 21:58:24 +00:00
Bill Currie
627c6f70f5
allow casting between function types
2003-03-10 21:23:05 +00:00
Bill Currie
6b20862865
disable some debug
2003-03-04 21:13:10 +00:00
Bill Currie
ef762e21eb
allow initialized globals (since they're constant) to be used in most places
...
constants are required (switch, initializing globals, enums)
2003-02-28 04:54:07 +00:00
Bill Currie
761a7546dd
re-arrange things so __attribute__ and __builtin_expect are properly
...
autoconfiscated so rcsid will continue to work with gcc 3.3
2003-01-15 15:31:36 +00:00
Bill Currie
71196fedf6
make gcc more anal about prototypes, string constants and function
...
visibility (ie, global functions must have a prototype)
2003-01-06 18:28:13 +00:00
Bill Currie
2a5ac8c42d
returning value for void function now a warning for traditional
2002-12-13 23:21:09 +00:00
Bill Currie
64a9a8199c
allow if (void expr) (with warning) in traditional mode
2002-12-13 23:16:42 +00:00
Bill Currie
aec0c9eea1
make return type missmatch a warning for --traditional
2002-12-13 23:05:24 +00:00
Bill Currie
3c215ce13f
getting closer to working categories
2002-11-14 18:17:43 +00:00