mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 06:10:56 +00:00
[qfcc] Add failing test for unary minus
Producing a void type... very odd.
This commit is contained in:
parent
d88c1e2f40
commit
d5604aef73
2 changed files with 24 additions and 0 deletions
|
@ -71,6 +71,7 @@ test_progs_dat=\
|
|||
triangle.dat \
|
||||
typedef.dat \
|
||||
typelinker.dat \
|
||||
unaryminus.dat \
|
||||
vecaddr.dat \
|
||||
vecexpr.dat \
|
||||
vecinit.dat \
|
||||
|
@ -533,6 +534,16 @@ typelinker.run: Makefile build-run
|
|||
include $(typelinker_dep) # am--include-marker
|
||||
r_depfiles_remade += $(typelinker_dep)
|
||||
|
||||
unaryminus_dat_SOURCES=unaryminus.r
|
||||
unaryminus_obj=$(unaryminus_dat_SOURCES:.r=.qfo)
|
||||
unaryminus_dep=$(addprefix ./$(DEPDIR)/,$(unaryminus_obj:.qfo=.Qo))
|
||||
unaryminus.dat$(EXEEXT): $(unaryminus_obj) $(QFCC_DEP)
|
||||
$(QFCC) $(QCFLAGS) -o $@ $(unaryminus_obj)
|
||||
unaryminus.run: Makefile build-run
|
||||
@$(srcdir)/build-run $@
|
||||
include $(unaryminus_dep) # am--include-marker
|
||||
r_depfiles_remade += $(unaryminus_dep)
|
||||
|
||||
vecaddr_dat_SOURCES=vecaddr.r
|
||||
vecaddr_obj=$(vecaddr_dat_SOURCES:.r=.qfo)
|
||||
vecaddr_dep=$(addprefix ./$(DEPDIR)/,$(vecaddr_obj:.qfo=.Qo))
|
||||
|
|
13
tools/qfcc/test/unaryminus.r
Normal file
13
tools/qfcc/test/unaryminus.r
Normal file
|
@ -0,0 +1,13 @@
|
|||
int strlen (string s) = #0;
|
||||
|
||||
int foo (string bar)
|
||||
{
|
||||
int len;
|
||||
len = -strlen (bar);
|
||||
return len;
|
||||
}
|
||||
|
||||
int main (void)
|
||||
{
|
||||
return 0;
|
||||
}
|
Loading…
Reference in a new issue