On 11/3/26 16:08, Jerry D wrote:
On 11/3/26 2:39 PM, Harald Anlauf wrote:
Dear all,
this patch seems to be a very special challenge:
The testcase has an UTF-8 byte order mark, which I do not see in the
patch unless I use "od". If you don't see it, then please see the
attachment in the PR for reference.
We used a too short line buffer when reading the testcase, leading
to valgrind invalid read/writes. The solution here is to extend
the line buffer, taking care of line length limits. I do hope I
got it right.
Regtested on x86_64-pc-linux-gnu. OK for mainline?
Thanks,
Harald
Yes, OK Harald.
I did a read of the standard and this is acceptable.
Is it?
6.1.1 Characters
The processor character set is processor dependent. Each character
in a processor character set is either a control character or a
graphic character. The set of graphic characters is further divided
into letters (6.1.2), digits (6.1.3), underscore (6.1.4), special
characters (6.1.5), and other characters (6.1.6).
The letters, digits, underscore, and special characters make up the
Fortran character set.
A UTF-8 BOM is not a member of the special characters (6.1.5). It can
be a member of the processor character set.
6.1.6 Other characters
Additional characters may be representable in the processor, but
shall appear only in comments (6.3.2.3, 6.3.3.2), character constants
(7.4.4), input/output records (12.2.2), and character string edit
descriptors (13.3.2).
I think it needs to be hidden behind an -fallow-utf-8-bom option
or some such knob. At a minimum, a warning should be issued.