From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16853 invoked by alias); 6 May 2008 21:56:39 -0000 Received: (qmail 16714 invoked by uid 48); 6 May 2008 21:55:54 -0000 Date: Tue, 06 May 2008 21:56:00 -0000 Message-ID: <20080506215554.16713.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug other/36150] colorize output of gcc In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "esigra at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-05/txt/msg00494.txt.bz2 ------- Comment #8 from esigra at gmail dot com 2008-05-06 21:55 ------- (In reply to comment #7) > If you added escape sequences to the string constants in the gcc source > then it would only work for the C locale messages. Adding escape sequences for colours would work as well with localization as any other formatting. Simple example: printf("%s%s%s%s", warning_format_start, _("warning: "), _("the actual message"), warning_format_end); Here warning_format_start may be a pointer to "" and warning_format_end a pointer to "". If colours are disabled, they both point to "". So the result might be "warning: the actual message" or "warning: the actual message". Localization would work fine for both "warning: " and "the actual message". I do not really see the problem that you were thinking of. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36150