Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1321717ybg; Fri, 18 Oct 2019 15:56:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/6CyqCmiPF8l2gtjmRw5kvdplMTzErHWT25z9vsqzlA+eCKi4N2N1ICSpUwK/l44xlg/D X-Received: by 2002:a17:906:7094:: with SMTP id b20mr11288627ejk.134.1571439386420; Fri, 18 Oct 2019 15:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571439386; cv=none; d=google.com; s=arc-20160816; b=Z1huczzXhwcd1O296ova6DZEMajKXukjH8x/iVvHblgcpcND0jfm5UObjvjhvSvV/u /GiF4hDvKDXW99WjQkQGMtoGHsMVZu7KoCDokZPbCcreMFoH/esCpJafyoU2yGi2j+1k f4MQQdOcM0V9oVRB28uDCdFW0lb2XWn/HL+GAoQGrVTznaB9u7IS7bKFdLCatnnIK2iY FI5+tswcPOuKEff3dNH0BfdCEjawLmoSXNVyLjCCdrKHIvQTaDNqvaFufnR6NTvHQbXk VpeK7mhNaEo0QtOyEFF+8N/hY7KEJVeZkmAN2lR82HpQjTBc0X1nHrWOmqz+cxwFbEeY I8Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uNM5D576B8sHjDG8vnn5qQZ6lZD1oQyLwfmGZHpyHPs=; b=uMmOEfQfljC8oXzquTjhCWQFez0TYIxq3bjSS2iQCN2v3Of6cb1ecugwcKcFk0OG8t mTJlnlwGtiHjPcCFscirfjwgnMsHCmq8NMyYPux9zAwSgSfKNw1x5I6b7ZhIGx2zUzV8 JlsmpOIP6YapwPuPDEX/uTBdNxBXP/HEwJg8E/8tgjBwvz9BIGhpQjlcbW8ul+M8WoB9 boXvCmkpG07ZR93R0JLllST0I627bNpmtpFjLf4qhsqo4qYwTO/85Bu7woS5xgzSSu4m ch3doFLGO1IS94xcibwrwvNgvhxbVsBIBDi5wTNJGVUYswHwbhXgKOFmu2I0ayMKhvoN vHlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mHdqzfGm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i18si4333691ejb.145.2019.10.18.15.56.03; Fri, 18 Oct 2019 15:56:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mHdqzfGm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2442068AbfJRFrG (ORCPT + 99 others); Fri, 18 Oct 2019 01:47:06 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:37213 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727823AbfJRFrG (ORCPT ); Fri, 18 Oct 2019 01:47:06 -0400 Received: by mail-wm1-f66.google.com with SMTP id f22so4776031wmc.2 for ; Thu, 17 Oct 2019 22:47:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uNM5D576B8sHjDG8vnn5qQZ6lZD1oQyLwfmGZHpyHPs=; b=mHdqzfGmHn9g4etrFlilXztklbz9uHDHVpn+164bm1WLeyNevDemg0bZ8UtczJnv+A s8er2ZT93AwmxS1DhyLPD3TAvl7mQi+i+Wzw1JjSx/BVxnxbOnnqGh6Ot1mOJziIlgbS Py6YbVVB0AYOnik+vbDql3Q99kPboJcz6iYZakULtV+iTvdWu+fsd2FNQBBmLbz7S3N+ F4wHbPP0vT7+OfXYXLQ0mcd/ZhWoif/bv67w6RJpu1JxIQWXH4amxZUoJ1wP3yj5TmuN WCBPMt49ZRqX/xqxPC3hKmE2JC1OZoLeKbi7rNMHeUaxJE9FESgPwqOJqCBgX6fxMZ5U ooyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=uNM5D576B8sHjDG8vnn5qQZ6lZD1oQyLwfmGZHpyHPs=; b=Idxydod3aaeAoEZg3gXKBFAVbrCNrDdyPJdCLVRrVqLEJm5x5vOGy8rd9tu7DGANor IMEZSIK72ChNSCm82NDGoFIkfjnaiwH5/KRoq/wN7bbbVkwMWkj7X85PI/XsPpzyUyvL XvKMvefGsFaL1iKI1P0qbCeZcO8EIEi6zrW/6qzp/vtX48/77rGhip9TS7JUcpXUMZ9H Z48qOIIRy/4Pp96BoFeeZEa1R4Smuecsg1onsEUAv0Rl/r08zV4k7lnI/WEfNB9WQxgn 5+LhVMUJhqa4ShxiF+lsaGw7nvFqGyLZGIhNaN+opMQIHeO8/qTAjB7mYPgPn1kZY+y/ M1dA== X-Gm-Message-State: APjAAAXUP293rFCOh1zeqbAOqeRNN/4GGZ0g/BXbQEnaj1XoXigab8cf S8J9uoaFKiTeWalpB12zs0k= X-Received: by 2002:a1c:a784:: with SMTP id q126mr5676273wme.59.1571377624365; Thu, 17 Oct 2019 22:47:04 -0700 (PDT) Received: from ltop.local ([2a02:a03f:40ac:ce00:f882:d2a3:f943:89a4]) by smtp.gmail.com with ESMTPSA id r7sm4244973wrt.28.2019.10.17.22.47.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Oct 2019 22:47:03 -0700 (PDT) Date: Fri, 18 Oct 2019 07:47:02 +0200 From: Luc Van Oostenryck To: Paul Walmsley Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/8] riscv: init: merge split string literals in preprocessor directive Message-ID: <20191018054701.sjueyb3agoaopnla@ltop.local> References: <20191018004929.3445-1-paul.walmsley@sifive.com> <20191018004929.3445-4-paul.walmsley@sifive.com> <20191018040237.3eyrfrty72r63pkz@ltop.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 17, 2019 at 09:38:18PM -0700, Paul Walmsley wrote: > On Fri, 18 Oct 2019, Luc Van Oostenryck wrote: > > > On Thu, Oct 17, 2019 at 05:49:24PM -0700, Paul Walmsley wrote: > > > sparse complains loudly when string literals associated with > > > preprocessor directives are split into multiple, separately quoted > > > strings across different lines: > > > > ... > > > > > #ifndef __riscv_cmodel_medany > > > -#error "setup_vm() is called from head.S before relocate so it should " > > > - "not use absolute addressing." > > > +#error "setup_vm() is called from head.S before relocate so it should not use absolute addressing." > > > #endif ... > On the other hand, gcc seems to support the non-backslashed syntax. So if > the intention is for sparse to follow the gcc practice, and to be used > beyond the kernel, maybe it's worth aligning sparse to gcc? Only if > you're bored, I suppose... I quickly checked and gcc also complain about the second line: $ cat y.c #ifndef __riscv_cmodel_medany #error "setup_vm() is called from head.S before relocate so it should " "not use absolute addressing." #endif $ gcc -c y.c y.c:2:2: error: #error "setup_vm() is called from head.S before relocate so it should " #error "setup_vm() is called from head.S before relocate so it should " ^~~~~ y.c:3:8: error: expected identifier or '(' before string constant "not use absolute addressing." ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ So it seems that gcc doesn't join these lines. Fell free to add my: Reviewed-by: Luc Van Oostenryck -- Luc