-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 12.11.2013 23:29, schrieb Christophe VG: > Hello, > > while getting sdcc up and running for a new project, I stumbled > upon the following. > > $ cat minimal.c typedef unsigned long long QWORD; // 64-bit > unsigned typedef signed long long LONGLONG; // 64-bit signed > > void main(void) { } > > $ sdcc minimal.c minimal.c:1: error 206: invalid combination of > short / long minimal.c:2: error 206: invalid combination of short / > long > > $ sdcc --version SDCC : > mcs51/gbz80/z80/z180/r2k/r3ka/ds390/pic16/pic14/TININative/ds400/hc08/s08 > 3.3.0 #8604 (Nov 12 2013) (Mac OS X x86_64) > > Although I on the homepage I do read that sdcc’s features include: > "basic (no integer constants) support for long long (64 bit, 8 > bytes) data types for the z80, z180, r2k, r3ka, gbz80, hc08 and s08 > targets.” > > Sorry, if I’m not seeing the elephant in the room here :-) Thanks > for helping out in advance, regards, Christophe VG
sdcc minimal.c will compile minimal.c interpreted as source code written in the C89 dialect sdcc uses by default for the mcs51 target. long long was introduced in C99, and is thus not allowed in C89 (and the C89 dialect sdcc uses by default). AFAIK the mcs51 target does not support long long. You need to compile using a C standard that has long long and for a target that supports it, e.g. sdcc --std-c99 -mz80 minimal.c Philipp P.S.: Even though not mentioned on the homepage, the tlcs90 and stm8 targets support long long, too. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iEYEARECAAYFAlKCwcUACgkQbtUV+xsoLprFdgCePrL6IPCjyftWTBbTCw5sUTO/ rosAoJTo5pW4JQmOjSS/ex3nEvc9kHep =jesI -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user