[previous] 0831 [next] [E] Use of '\\' in this '#include' line is a PC extension - this usage is non-portable.
Language extensions REFERENCE - ISO:C90-6.1.7 Header Names - Semantics

The backslash character \ has been encountered in the specification of a header name in a #include directive.

The ISO:C Standard says that if the characters ', \, ", or / followed by * occur in the specification of the header name in a #include directive, the result is undefined. (It is therefore not possible for an escape sequence to be supplied as part of a header name.)

QA·C will recognise the backslash character as a path separator character in a PC environment but will generate message 0831 to identify the fact that this is an extension to the C language. Specifying paths for header files should be avoided where possible, but if they have to be specified , a Unix style path separator '/' will result in more portable code.

For example:


/*PRQA S 553,816,862 EOF*/

#include ".\pcpath\head.h"           /* Message 0831 */

See also:

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents