Notice: We have migrated to GitLab launching 2024-05-01 see here:

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

03/15/15 22:13:37 (9 years ago)
Joel Sherrill

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


  • 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.
     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.
     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.
     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.
     33== Disable deprecated warnings ==
     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:
     39 * We know this is deprecated and don't want a warning on every BSP built.
     40 */
     41#pragma GCC diagnostic ignored "-Wdeprecated-declarat
     44If it is for a section of code, then this is the appropriate code to surround the section with:
     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
    2657== Add a release note ==
    2758Add the feature to a list of deprecated interfaces in the release notes.