This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
-fbackslash
Change the interpretation of backslashes in string literals from a single backslash character to "C-style" escape characters. The following combinations are expanded \a, \b, \f, \n, \r, \t, \v, \, and \0 to the ASCII characters alert, backspace, form feed, newline, carriage return, horizontal tab, vertical tab, backslash, and NUL, respectively. All other combinations of a character preceded by \ are unexpanded.
-- modify show_locus to display large character source lines, by escape-encoding characters that are not ASCII-printable (extending what was previously done)I think we need to update the algorithm. As soon as non ASCII characters are used, the error location is wrong.
Example:
print *, 'Hello World'wrong ! position is OK 1 Error: Syntax error in PRINT statement at (1)
print *, 'Hello W\xC3\xB6rld'wrong ! Position is misleading 1 Error: Syntax error in PRINT statement at (1)
(This is not a regression as the current version behaves exactly the same, however, the use of non-ascii characters will increase and thus it makes sense to implement this, e.g. by returning the number of (ascii) characters printed via print_wide_char and adding this number to the column number.)
As a consequence of this patch, memory usage to store the source file roughly quadruples.I've not seen a single case where it gives a significant memory increase on the total amount used during compilation higher than 7%It would be great if a implementaion could be found which reduces the memory maximally needed for compilation, which is not a maintenance burden.
-- François-Xavier Coudert http://www.homepages.ucl.ac.uk/~uccafco/
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |