Revert "Fix ticket #417 (Crashes in Windows because of invalid char value)"

This reverts commit 70db2562f4.

See the ticket - the fix was not correct fix.
This commit is contained in:
Kimmo Varis 2009-06-19 10:20:15 +03:00
parent 1619b6cb0f
commit 3da3c74f6f
2 changed files with 1 additions and 10 deletions

View File

@ -261,15 +261,6 @@ std::string Preprocessor::read(std::istream &istr)
if (ch == '\n')
++lineno;
// UTF / extended ASCII => The output from the preprocessor should
// only be standard ASCII.
// In C/C++ code the UTF and extented ASCII (8-bit ASCII) can only
// appear in comments, strings and char constants. So the safest thing
// to do is replace it with space char. We CAN'T change string lengths
// by ignoring characters.
if (ch < 0)
ch = ' ';
// Replace assorted special chars with spaces..
if ((ch != '\n') && (std::isspace(ch) || std::iscntrl(ch)))
ch = ' ';

View File

@ -1000,7 +1000,7 @@ private:
{
const char filedata[] = {'a', (char)200, 0};
std::istringstream istr(filedata);
ASSERT_EQUALS(Preprocessor::read(istr), "a ");
ASSERT_THROW(Preprocessor::read(istr), std::runtime_error);
}
void define_part_of_func()