Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 04 Feb 2015 11:36:26 +0100 (CET) Received: (from localhost user: 'macro', uid#1010) by eddie.linux-mips.org with ESMTP id S27011464AbbBDKgY2p0sZ (ORCPT ); Wed, 4 Feb 2015 11:36:24 +0100 Date: Wed, 4 Feb 2015 10:36:24 +0000 (GMT) From: "Maciej W. Rozycki" To: Daniel Sanders cc: Toma Tabacu , Ralf Baechle , Paul Burton , Paul Bolle , "Steven J. Hill" , Manuel Lauss , Jim Quinlan , linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/5] MIPS: LLVMLinux: Silence unicode warnings when preprocessing assembly. In-Reply-To: <1422970639-7922-6-git-send-email-daniel.sanders@imgtec.com> Message-ID: References: <1422970639-7922-1-git-send-email-daniel.sanders@imgtec.com> <1422970639-7922-6-git-send-email-daniel.sanders@imgtec.com> User-Agent: Alpine 2.11 (LFD 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 45645 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: macro@linux-mips.org Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips On Tue, 3 Feb 2015, Daniel Sanders wrote: > From: Toma Tabacu > > Differentiate the 'u' GAS .macro argument from the '\u' C preprocessor unicode > escape sequence by renaming it to '_u'. > > When the 'u' argument is evaluated, we end up writing '\u', which causes > clang to emit -Wunicode warnings. > > This silences a couple of -Wunicode warnings reported by clang. > The changed code can be preprocessed without warnings by both gcc and clang. I suspect it is a clang preprocessor bug that: 1. It interprets these character pairs as unicode escapes for assembly sources, I think it should be up to the language translator rather than the preprocessor, i.e. the assembler in this case (the notion of unicode escapes for the preprocessor appears to be limited to stringification, and then it is implementation-defined). 2. It considers these character pairs to be unicode escapes in the first place given that they do not follow the syntax required for such escapes, that is `\unnnn', where `n' are hex digits. Of course it may be reasonable for us to work this bug around as we've been doing for years with GCC, but has the issue been reported back to clang maintainers? What was their response? Maciej