unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: pjb@informatimago.com (Pascal J. Bourguignon)
To: help-gnu-emacs@gnu.org
Subject: Re: gcc errors in compiler output
Date: Sun, 27 Dec 2009 02:01:22 +0100	[thread overview]
Message-ID: <87k4w9mdr1.fsf@hubble.informatimago.com> (raw)
In-Reply-To: hh68c0$htv$1@speranza.aioe.org

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:
>
>
> gcc -o my_test my_test.c
> my_test.c: In function ‘main’:
> my_test.c:58: error: expected ‘;’ before ‘x’
>
> If I run the compiler in an ordinary xterm (or Konsole), the output
> appears to be some colorization of the identifiers in the context of
> the error.

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

my_test.c: In function ‘main’:
my_test.c:58: error: expected ‘;’ before ‘x’


> The hex dump shows the missing charaters:
>
> 6d 79 5f 74 65 73 74 2e  63 3a 20 49 6e 20 66 75  |my_test.c: In fu|
> 6e 63 74 69 6f 6e 20 e2  80 98 6d 61 69 6e e2 80  |nction ...main..|
> 99 3a 0a 6d 79 5f 74 65  73 74 2e 63 3a 35 38 3a  |.:.my_test.c:58:|
> 20 65 72 72 6f 72 3a 20  65 78 70 65 63 74 65 64  | error: expected|
> 20 e2 80 98 3b e2 80 99  20 62 65 66 6f 72 65 20  | ...;... before |
> e2 80 98 78 e2 80 99 0a                           |...x....|

I see no missing character here.


> What is the solution to either a) get gcc to not output terminal color
> settings around identifiers or b) make emacs ignore the extraneous
> stuff around the identifiers?

Configure the same encoding in your terminal and in your shell!


If your terminal handles UTF-8:

[pjb@hubble :0.0 tmp]$ export LC_CTYPE=en_US.UTF-8
[pjb@hubble :0.0 tmp]$ cc  -c -o a.o a.c
a.c: In function ‘main’:
a.c:3: error: expected ‘;’ before ‘x’


If your terminal handles ISO-8859-1:

[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'

etc...




-- 
__Pascal Bourguignon__                     http://www.informatimago.com/


  reply	other threads:[~2009-12-27  1:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-27  0:05 gcc errors in compiler output Julianne
2009-12-27  1:01 ` Pascal J. Bourguignon [this message]
2009-12-27  6:36   ` tomas
2009-12-27 22:21 ` Vagn Johansen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k4w9mdr1.fsf@hubble.informatimago.com \
    --to=pjb@informatimago.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).