Mercurial > ~dholland > hg > tradcpp > index.cgi
view TODO @ 203:3a25180d3a5c
Abort on line numbering or column numbering overflow.
Line numbers are limited to values that fit in "unsigned int". Also
reject input lines longer than 2^32-1 characters. It seems reasonable
to presume that any input that violates these constraints is someone
screwing around and not a serious attempt to compile or preprocess
anything useful. Done in response to n2129, but without getting into
any of the silliness found there.
author | David A. Holland |
---|---|
date | Tue, 01 Aug 2017 14:51:04 -0400 |
parents | 6947cd2cde79 |
children |
line wrap: on
line source
not implemented: - mode.input_allow_dollars. - column counts do not take tabstops into account. - mode.output_linenumbers. - mode.do_depend. - mode.do_macrolist. - mode.do_trace. - warns.endiflabels. (they cause errors) - warns.unused. - the -iremap option. - $CPP_RESTRICTED - other environment variables tidy up: - get rid of inlinedefs.h - use of places in and below macro.c is pretty bogus. - macro code should be reworked. - place_changefile is manky and wastes memory. Also, in an ideal world we'd remember the place #line changed the name and refer to it when printing errors. fix: - "#if 0 && 1/0" should not crash; fix eval method. - quote characters and comment delimiters that are emitted by macros are not recognized. See: t34 (should produce a quote and FOO Q) t35 (similarly, this test may be redundant once it's fixed) t36 (C(3) should produce nothing) t37 (BC foo EC should produce nothing) Joerg says comments like in t36 should be stripped exactly twice, once when the macro is defined and again when it's expanded. Note that gcc's cpp -traditional is getting t37 wrong, and it gets t36 wrong with -C. - remove the intentionally undocumented -p option and generate proper linenumber output. (also, in this code what happens if a comment spans files? I bet currently it will emit the line number into the comment.)