TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
ASML C Coding Standard
Search

Rule:  6.9.1.bChecked automatically with code checker

Synopsis:Do not use K&R declaration style.
Language:C
Severity Level:6
Category:External Definitions


Description:

Justification

K&R declaration style is not supported in C++. So programs will not be portable from C to C++ if they use this style of declaration.

Example

int foo(a, p) /* WRONG, K&R style */
  int a;
  char* p;
{
  return 0;
}

int foo(int a, char* p) /* RIGHT, ANSI style */
{
  return 0;
}