Re: [cc65] nq.c(46): Error: Integer expression expected

From: Thomas Giesel <>
Date: 2009-08-25 09:15:21

cc65 doesn't support float, try something like

printf("\nRuntime: %ld sec, per iteration
%d msec\n\n",end-start,1000*(end-start)/ITERATIONS);

And think about using using long twice. It adds some more or less large library functions and is slow.


-------- directBOX Reply ---------------
To  :
Date: 25.08.2009 04:02:40

I get the following error:

nq.c(46): Error: Integer expression expected

With the following:

printf("\nRuntime: %ld sec, per iteration

end and start are time_t, ITERATIONS is a define statement (100).

Same code compiles with gcc and Aztec C without issue.  If I remove just the
ITERATIONS and try to cast to a float I get:

cl65 --static-locals -O -t apple2enh nq.c tcp.o
nq.c(46): Internal compiler error:
Invalid type in CF flags: 0004, type = 4

Input: printf("\nRuntime: %ld sec, per iteration
cl65: Subprocess `cc65' aborted by signal 6

Any ideas how I can get around this?


To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Aug 25 09:15:29 2009

This archive was generated by hypermail 2.1.8 : 2009-08-25 09:15:32 CEST