It would be nice if there was a macro holding SDCC's svn revision as well (5068 at the time of this writing).
This would allow to embed the exact version of the compiler with wich a source was compiled into the binary:
int __code __at(0xffb0) compiler_version = SDCC;
int __code __at(0xffb8) compiler_revision = SDCC_REVISION;
Logged In: YES
user_id=888171
Originator: NO
Very nice.
Can you add it to preProcess() in SDCCmain.c? And document it in the manual?
Please also put it on the release wiki and esp. in the new features list at the bottom of the page.
Maybe you can even combine it with the request for SDCC_INT_LONG_REENT by Paul Stoffregen on the developer mailing list d.d. 2008-020-04?
Logged In: YES
user_id=589052
Originator: YES
> Can you add it to preProcess() in SDCCmain.c?
done. Thanks for the pointer:)
> And document it in the manual?
I tried. But my local LyX version is 1.5.2 whereas the LyX version used for
the manual in the repository is 1.4.5.
Unfortunately the LyX format seems to have changed slightly, so although
I only made a new entry within the table in section 3.19, this causes
quite a few changes (so upgrading to LyX 1.4.x to 1.5.x is probably
something to do after release) :
diff -u sdccman.lyx.new sdccman.lyx | wc
11478 24561 239491
> request for SDCC_INT_LONG_REENT
did so "by hand". Probably the optionsTable[] (SDCCmain.c line 148)
should (pre/post 2.8.0) get a new column so that the appropriate
compiler options could be automatically converted into precompiler
defines? (setting Status to Pending)
Logged In: YES
user_id=568035
Originator: NO
Frieder, can you send me the sdccman changes in text format and I'll update it.
The LyX version on the build machine is still 1.4.x, so we can't change the format until the build machine is upgraded.
Borut
Logged In: YES
user_id=568035
Originator: NO
Docummented predefined macros SDCC_REVISION, SDCC_PARMS_IN_BANK1, SDCC_FLOAT_REENT and SDCC_INT_LONG_REENT.
> Probably the optionsTable[] (SDCCmain.c line 148)
> should (pre/post 2.8.0) get a new column so that the appropriate
> compiler options could be automatically converted into precompiler
> defines? (setting Status to Pending)
Status Pending will be automatically changed to Closed after a month or so. I recommend to open an other RFE and close this one.
Borut
Logged In: YES
user_id=603650
Originator: NO
Along this lines, would it be possible to add a predefined macro to indicate that the compiled file contains the main() function?
Logged In: YES
user_id=568035
Originator: NO
Jesus, if I understand you well, the answer is no: the "predefined macros" are passed from the C front end, which just elaborates the command line options, to the C preprocessor, which substitutes the macro values with definitions (among other things), so none of them have a clue about function names. The C source file gets parsed after being preprocessed and the parser is the guy who knows the function names, but in that moment the preprocessing has already finished, so it's too late...
Borut
Logged In: YES
user_id=589052
Originator: YES
Hi Borut, thanks for updating the manual. Closing.