help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gcc errors in compiler output


From: tomas
Subject: Re: gcc errors in compiler output
Date: Sun, 27 Dec 2009 07:36:44 +0100
User-agent: Mutt/1.5.15+20070412 (2007-04-11)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, Dec 27, 2009 at 02:01:22AM +0100, Pascal J. Bourguignon wrote:
> Julianne <juliannerc@gmail.com> writes:
> 
> > When using emacs 23.1 on Fedora 12, compiling a simple c file with an
> > error yields the following output:

[...]

> That's where your error lies.  It is not a colorization, but an
> encoding in utf-8 of the characters ‘ and ’:

[...]

> [pjb@hubble :0.0 tmp]$ export LC_CTYPE=en_US.ISO-8859-1
> [pjb@hubble :0.0 tmp]$ cc  -c -o a.o a.c
> a.c: In function 'main':
> a.c:3: error: expected ';' before 'x'

Exactly. Since ggcc 4.0 [1], the output of GCC is uTF-8, if the locale
allows. So your best bet is to do what Pascal suggests or even more
radically call "LC_ALL = C gcc" instead of just "gcc" to turn off this
"feature". You might tweak the environment your compile subprocess sees
with setenv in Emacs.

[1] See <http://gcc.gnu.org/gcc-4.0/changes.html> under "Caveats", and
search for the phrase "English-language diagnostic messages".

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFLNwB8Bcgs9XrR2kYRApY9AJ90QCq+fXjTpFWEmXtL59IDN9QlmACfWs+I
7q1omxN3iDIdxhUkR2aDS3I=
=cUwj
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]