Language extensions
CScout implements the
C language as defined in ANSI X3.159-1989.
In addition, it supports the following extensions:
- Initialization designators (C99)
- Compound literals (C99)
- Declarations can be intermixed with statements (C99).
- Recognise
__atribute__(__unused__)
for determining which
identifiers should not be reported as unused (gcc).
-
//
line comments (common extension)
-
__asm__
blocks (gcc)
-
enum
lists ending with a comma (common extension)
- Anonymous
struct/union
members (gcc, Microsoft C)
- Allow
case
expression ranges (gcc).
-
__typeof
keyword (gcc)
- A compound statement in brackets can be an expression (gcc)
- Macros expanding from
/##/
into
//
are then treated as a line comment (Microsoft C)
-
#include_next
preprocessor directive (gcc)
-
#warning
preprocessor directive (gcc)
- Variable number of arguments preprocessor macros
(support for both the gcc and the C99 syntax)
- Allow empty member declarations in aggregates (gcc)
-
long long
type (common extension)
- A semicolon can appear as a declatation (common extension)
- An aggregate declaration body can be empty (gcc)
- Aggregate member initialization using the member: value syntax (gcc)
- Statement labels do not require a statement following them (gcc)
- #ident preprocessor directive (gcc)
- Allow assignment to case expressions (common extension)
- Accept an empty translation unit (common extension).
- Support locally declared labels (
__label__
) (gcc).
- Dereferencing a function yields a function (common extension).
Many other compiler-specific extensions are handled by suitable
macro definitions in the CScout initialization file.
Contents Previous Next (Processing yacc files)
Last change: Sunday, August 17, 2003 8:02 pm
(C) Copyright 2000-2003 Diomidis Spinellis. May be freely viewed using web browsers and similar programs. All other rights reserved.