Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965350AbbBDKga (ORCPT ); Wed, 4 Feb 2015 05:36:30 -0500 Received: from eddie.linux-mips.org ([148.251.95.138]:47531 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965309AbbBDKg0 (ORCPT ); Wed, 4 Feb 2015 05:36:26 -0500 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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1514 Lines: 35 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/