[PATCH] Fix preprocessor/22042 stringify and unprintable charactors

Andrew Pinski pinskia@physics.uc.edu
Thu Oct 27 19:36:00 GMT 2005


The problem here is that libcpp wants to octalify unprintable
charactors which is just wrong according to the C and C++ standard.

This patch fixes the problem by removing the code which does this, it
also lowers the needed buffer for stringification as we only now need
a max of 2 times the size instead of 4 times.

OK? Bootstrapped and tested on x86_64-pc-linux-gnu with no regressions.

Thanks,
Andrew Pinski

libcpp/ChangeLog:
	* macro.c (_cpp_builtin_macro_text): Lower the needed max
	buffer size.
	(cpp_quote_string): Don't octalify non printable charactors.

testsuite/ChangeLog:
	* gcc.dg/cpp/strify4.c: New test.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fixPR22042.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20051027/99f7f579/attachment.txt>


More information about the Gcc-patches mailing list