For Programmers: Free Programming Magazines  


Home > Archive > VC Language > November 2005 > Preprocessor (cl -E) limits ? (Error C2018 )









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Preprocessor (cl -E) limits ? (Error C2018 )
Xavier Roche

2005-11-21, 7:58 am

Does anyone know why certain characters are permitted in a 8-bit source
file when using cl -E and not others ?

Example 1:
----------

#define Foo() Holà, Mundo!
Foo()

cl -E -P foo.c
cat foo.i

#line 1 "foo.c"

Holà, Mundo!

Example 2:
----------

#define ThreeQuarters() This is a ¾!
ThreeQuarters()

cl -E -P foo.c
foo.c(2) : error C2018: unknown character '0xbe'

This is not an UTF-8 limit problem ("Holà, Mundo!" is definitely NOT a
valid UTF-8 sequence), so where's the problem?


(note: yes, this is not a valid C source, but I'm just using the
preprocessor)

Version:
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com