Bug 19753 - different LANG settings and ccache don't work together
Summary: different LANG settings and ccache don't work together
Status: ASSIGNED
Alias: None
Product: gcc
Classification: Unclassified
Component: preprocessor (show other bugs)
Version: 3.4.2
: P2 normal
Target Milestone: ---
Assignee: Tom Tromey
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2005-02-02 09:24 UTC by Jörg Richter
Modified: 2021-09-20 07:57 UTC (History)
5 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2007-01-08 01:31:14


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg Richter 2005-02-02 09:24:10 UTC
$ touch a.cc
$ LANG=C g++ -E a.cc
# 1 "a.cc"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "a.cc"

$ LANG=de_DE g++ -E a.cc
# 1 "a.cc"
# 1 "<eingebaut>"
# 1 "<Kommandozeile>"
# 1 "a.cc"

IMHO, preprocessor output should be independend of LANG settings. This prevents 
ccache (http://ccache.samba.org) from working for different users using 
different LANG settings.

A workaround for my problem is to set LANG always to "C". But then you can't 
see translated errors/warnings.
Comment 1 Tom Tromey 2006-12-28 01:34:30 UTC
This seems reasonable enough to me, offhand.
I suppose <built-in> and <command line> are translated
because they may be visible as part of error reporting,
but this doesn't seem super compelling to me.

I think the fix for this is a couple of minor changes in
gcc/c-opts.c.  I will submit it a bit later to see what
other gcc developers think.
Comment 2 patchapp@dberlin.org 2007-01-01 21:57:15 UTC
Subject: Bug number PR preprocessor/19753

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01851.html
Comment 3 Eric Gallager 2018-03-02 13:12:27 UTC
(In reply to patchapp@dberlin.org from comment #2)
> Subject: Bug number PR preprocessor/19753
> 
> A patch for this bug has been added to the patch tracker.
> The mailing list url for the patch is
> http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01851.html

Do you know if it still applies/works?
Comment 4 Mark Wielaard 2021-09-20 07:57:43 UTC
Since then gcc/c-opts.c has been moved to gcc/c-family/c-opts.c which still uses _("<built-in>" and _("<command-line>").

Note that there is also _("<anonymous>") used in some files.

All probably shouldn't be translated, since they also end up in the DWARF output.