static function prototype - Printable Version +- MISRA Discussion Forums (https://forum.misra.org.uk) +-- Forum: MISRA C (https://forum.misra.org.uk/forumdisplay.php?fid=4) +--- Forum: MISRA-C: 2004 rules (https://forum.misra.org.uk/forumdisplay.php?fid=17) +---- Forum: 6.8 Declarations and Definitions (https://forum.misra.org.uk/forumdisplay.php?fid=35) +---- Thread: static function prototype (/showthread.php?tid=188) |
static function prototype - bpereira - 11-01-2006 The specification isn't clear about static function, should they have prototype or not ? The rule talk about declaration in header file, of course this isn't applicable to static function. So it sound to me that static function should not have prototype. - bmerkle - 18-01-2006 i think MISRA is clear in this point: page 31 states under Rule 8.1 as a hint: \"The provision of a prototype fro a function with internal linkage is a good programming pratice\" page 32 states under Rule 8.6: Functions shall be declared at file scope. So this concerns both, external (in header) and internal (in c source) IMO. also Rule 8.10 on page 33 kind regards, Bernhard. - misra-c - 27-04-2006 All functions shall have a prototype. |