Changes between Version 3 and Version 4 of Developer/Coding/Deprecating


Ignore:
Timestamp:
03/15/15 22:13:37 (9 years ago)
Author:
Joel Sherrill
Comment:

Add information on disabling deprecated warnings and updating support/test code.

Legend:

Unmodified
Added
Removed
Modified
  • Developer/Coding/Deprecating

    v3 v4  
    2424Find references to the deprecated feature in the user manuals (doc) and wiki, and make a note that the features are deprecated and may be removed.
    2525
     26== Update support code using deprecated feature ==
     27If there is support code using the feature, you will need to modify that support code to not use that feature. If the code cannot be immediately modified, file a ticket on the issue and disable the deprecated warning. The code will need to be addressed before the feature can be removed.
     28
     29If the code in question is such that the feature's use can benignly be removed when the feature is removed, then simply disable the deprecated warning as shown below.
     30
     31It is possible that a test may need to be split into two or more tests, so the code that is exercising the deprecated feature can be easily removed when the feature is removed.
     32
     33== Disable deprecated warnings ==
     34
     35After adding the deprecated attribute, the files which implement the method(s), any tests for them, and any support code using that feature that will remain until the feature is removed will need the deprecate warning disabled. If it is for an entire file, then using this:
     36
     37{{{#!C
     38/*
     39 * We know this is deprecated and don't want a warning on every BSP built.
     40 */
     41#pragma GCC diagnostic ignored "-Wdeprecated-declarat
     42}}}
     43
     44If it is for a section of code, then this is the appropriate code to surround the section with:
     45
     46{{{#!C
     47 /*
     48   * We know this is deprecated and don't want a warning on every BSP built.
     49   */
     50  #pragma GCC diagnostic push
     51  #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
     52     /**** Code using deprecated feature ****/
     53  #pragma GCC diagnostic pop
     54
     55}}}
     56
    2657== Add a release note ==
    2758Add the feature to a list of deprecated interfaces in the release notes.
    28