Language extensions


CScout implements the C language as defined in ANSI X3.159-1989. In addition, it supports the following extensions:
  1. Initialization designators (C99)
  2. Compound literals (C99)
  3. Declarations can be intermixed with statements (C99).
  4. Recognise __atribute__(__unused__) for determining which identifiers should not be reported as unused (gcc).
  5. // line comments (common extension)
  6. __asm__ blocks (gcc)
  7. enum lists ending with a comma (common extension)
  8. Anonymous struct/union members (gcc, Microsoft C)
  9. Allow case expression ranges (gcc).
  10. __typeof keyword (gcc)
  11. A compound statement in brackets can be an expression (gcc)
  12. Macros expanding from /##/ into // are then treated as a line comment (Microsoft C)
  13. #include_next preprocessor directive (gcc)
  14. #warning preprocessor directive (gcc)
  15. Variable number of arguments preprocessor macros (support for both the gcc and the C99 syntax)
  16. Allow empty member declarations in aggregates (gcc)
  17. long long type (common extension)
  18. A semicolon can appear as a declatation (common extension)
  19. An aggregate declaration body can be empty (gcc)
  20. Aggregate member initialization using the member: value syntax (gcc)
  21. Statement labels do not require a statement following them (gcc)
  22. #ident preprocessor directive (gcc)
  23. Allow assignment to case expressions (common extension)
  24. Accept an empty translation unit (common extension).
  25. Support locally declared labels (__label__) (gcc).
  26. 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.