Changes between Version 19 and Version 20 of Developer/Coding/Conventions


Ignore:
Timestamp:
May 29, 2014, 5:03:42 AM (5 years ago)
Author:
Gedare
Comment:

/* Source Code Style */

Legend:

Unmodified
Added
Removed
Modified
  • Developer/Coding/Conventions

    v19 v20  
    4949 *  Do not put unrelated functions or data in a single file.  This results in object code bloat.
    5050 *  If adding code to ''cpukit'' be sure the filename is unique since all files under that directory get merged into a single library.
     51= Language and Compiler =
     52
     53 *  Use C99.
     54 *  Favor C, but when assembly language is required use inline assembly if possible.
     55 *  Do not use compiler extensions.
     56 *  Pay attention to warnings. Strive to eliminate them.
    5157= Source Code Style =
    5258
    5359
    54  *  Use ANSI C not K&R.
    55  *  Do not use compiler extensions.
    5660 *  Use spaces instead of tabs.
    5761 *  Use two spaces for indentation, four spaces for hanging indentation.
    5862 *  Adhere to a limit of 80 characters per line.
    59  *  Pay attention to warnings. Strive to eliminate them.
    6063 *  Check all return statuses.
    61  *  Favor C over assembly language, and use inline assembly when possible.
    6264 *  Do not mix variable declarations and code.
    6365 *  Share code with other targets where possible.