diff --git a/src/preprocessor.cpp b/src/preprocessor.cpp index 72fff0ac4..ed56198d6 100644 --- a/src/preprocessor.cpp +++ b/src/preprocessor.cpp @@ -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 = ' '; diff --git a/test/testpreprocessor.cpp b/test/testpreprocessor.cpp index 8f2e4566b..73d5470ab 100644 --- a/test/testpreprocessor.cpp +++ b/test/testpreprocessor.cpp @@ -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()