Introduce deprecate warnings for sdcc specific keywords, not preceded with two underlines (data, code, idata, xdata, sfr, at, interrupt, using, ...) and announce in the documentation that they will be removed in the future.
Maybe we can create a new header file with macros for the old keywords defined in their new form. This will silence the warnings (and future errors) but still gives users an easy migration path.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"If somebody really don't want to see the warnings, he can use "#pragma disable_warning 197" in the source file or "--disable-warning 197" command line option."
But this won't work any more when the deprecated keywords will be removed sometime in the future, so the header file will be the only option for those that can't or don't want to change the deprecated keywords for one reason or another.
I actually don't know how much trouble my change caused to the sdcc users. I prepared and attached the old_keywords.h header file, since I don't want to include it to the sdcc distribution, at least not before somebody shows me that he really can't live without it.
Until now I received only comments from Maarten and Jesus, but I don't consider them as "typical sdcc users" and I'm convinced that they can handle the problem by their self ;-)
Let wait and see how the "typical" sdcc users will react...
Borut
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We are trying SDCC for certain HW platform support in our operating system MansOS.
Our code has variables or fields named 'data' all over the place. Never had problems with gcc.
The latest SDCC from svn (2.9.7 #5904 (Aug 5 2010) (Linux)) tells me 'data' is depreciated. Good.
But is there any way to remove the depreciated keywords now (with a switch or pragma) so that our code compiles?
Otherwise we get errors, not just warnings. An example follows.
Thanks. --Leo
Implemented in svn revision #5631.
The documentation is not updated yet.
Borut
Maybe we can create a new header file with macros for the old keywords defined in their new form. This will silence the warnings (and future errors) but still gives users an easy migration path.
I already wrote to the sdcc-mailing list:
"If somebody really don't want to see the warnings, he can use "#pragma disable_warning 197" in the source file or "--disable-warning 197" command line option."
But this won't work any more when the deprecated keywords will be removed sometime in the future, so the header file will be the only option for those that can't or don't want to change the deprecated keywords for one reason or another.
I actually don't know how much trouble my change caused to the sdcc users. I prepared and attached the old_keywords.h header file, since I don't want to include it to the sdcc distribution, at least not before somebody shows me that he really can't live without it.
Until now I received only comments from Maarten and Jesus, but I don't consider them as "typical sdcc users" and I'm convinced that they can handle the problem by their self ;-)
Let wait and see how the "typical" sdcc users will react...
Borut
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
We are trying SDCC for certain HW platform support in our operating system MansOS.
Our code has variables or fields named 'data' all over the place. Never had problems with gcc.
The latest SDCC from svn (2.9.7 #5904 (Aug 5 2010) (Linux)) tells me 'data' is depreciated. Good.
But is there any way to remove the depreciated keywords now (with a switch or pragma) so that our code compiles?
Otherwise we get errors, not just warnings. An example follows.
Thanks. --Leo
...the error...
kernel/devmgr.h:82: syntax error: token -> ';' ; column 15
...the code...
typedef union {
char *data; // (line 82 !!!)
struct {
uint8_t length;
char * data;
} ld;
struct {
uint16_t length;
char * data;
} ld16;
fpEvent_t eventHandler;
} devParams_t;
========
Last edit: Anonymous 2014-08-21
--std-c89 or --std-c99 command line options should help.
Borut