#285 deprecate warnings for sdcc specific keyword

closed
None
5
2011-10-16
2010-01-13
No

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.

Discussion

  • Borut Ražem

    Borut Ražem - 2010-01-13

    Implemented in svn revision #5631.
    The documentation is not updated yet.

    Borut

     
  • Maarten Brock

    Maarten Brock - 2010-01-14

    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.

     
  • Borut Ražem

    Borut Ražem - 2010-01-14
     
  • Borut Ražem

    Borut Ražem - 2010-01-14

    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

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2010-08-05

    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
  • Borut Ražem

    Borut Ražem - 2010-08-05

    --std-c89 or --std-c99 command line options should help.

    Borut

     
  • Borut Ražem

    Borut Ražem - 2011-10-16
    • status: open --> closed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks