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] |
Tested on i686-linux, committed on HEAD As documented and implemented, in the previous versions of GNAT, the check for line length maximum was based on a byte count, rather than a logical count of characters. This patch changes the behavior to count characters instead of bytes, which is a clear improvement for the wide character case. Note that the implementation works by counting bytes, and adjusting for wide character sequences. This avoids any extra overhead in the common (non-wide character) case. The following test program: -- xxxxxxxxxxxxxx Ð -- xxxxxxxxxxxxxx Ð procedure P1 is begin null; end P1; when compiled with: gcc -c -gnatW8 -gnatyM20 p1.adb should generate only one diagnostic: p1.adb:2:21: (style) this line is too long 2005-09-01 Robert Dewar <dewar@adacore.com> * scng.adb (Check_End_Of_Line): Count characters, rather than bytes (makes a difference for wide characters) * widechar.adb, widechar.ads: Add Wide_Char_Byte_Count feature to count chars vs bytes
Attachment:
difs.29
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |