Re: messed up error messages from gcc
On Wed, Dec 2, 2009 at 12:44 PM, Sven Joachim <svenjoac@gmx.de> wrote:
> Maybe your terminal is not in Unicode mode?
Good possibility, but, I thought that would only matter when non-ascii
characters came into play.
Oh... ok.. I just found the UTF 8 item on xterm and there actually is
a minor difference:
$ LANG=en_US.utf8 gcc -Werror -Wall t.c 2>&1 | od -c
0000000 c c 1 : w a r n i n g s b e
0000020 i n g t r e a t e d a s e
0000040 r r o r s \n t . c : I n f u
0000060 n c t i o n �200 230 f o o �200 231
0000100 : \n t . c : 2 : w a r n i n g
0000120 : i m p l i c i t d e c l a
0000140 r a t i o n o f f u n c t i
0000160 o n �200 230 b a r �200 231 \n
$ LANG=en_US gcc -Werror -Wall t.c 2>&1 | od -c
0000000 c c 1 : w a r n i n g s b e
0000020 i n g t r e a t e d a s e
0000040 r r o r s \n t . c : I n f u
0000060 n c t i o n ' f o o ' : \n t .
0000100 c : 2 : w a r n i n g : i m
0000120 p l i c i t d e c l a r a t i
0000140 o n o f f u n c t i o n '
0000160 b a r ' \n
Note that the single quotes wrapping foo are different. I guess gcc-3
used back-tick and single-tick, and gcc-4 uses the more modern quote
characters, that my environment couldn't handle.
So, now to read up on which resource I need to set up for xterm to
make this the default.
Many thanks all for pointing me in the right direction.
mrc
Reply to: