From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f45.google.com ([209.85.214.45]:37990 "EHLO mail-it0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750953AbdIJQ2A (ORCPT ); Sun, 10 Sep 2017 12:28:00 -0400 MIME-Version: 1.0 In-Reply-To: References: <1503132577-24423-1-git-send-email-yamada.masahiro@socionext.com> From: Linus Torvalds Date: Sun, 10 Sep 2017 09:27:58 -0700 Message-ID: Subject: Re: [RFC PATCH 0/3] kbuild: generate intermediate C files instead of copying _shipped files Content-Type: text/plain; charset="UTF-8" Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: Masahiro Yamada Cc: Sam Ravnborg , Michal Marek , Linux Kbuild mailing list , "devicetree@vger.kernel.org" , Rob Herring , Jonathan Corbet , Richard Purdie , Greg Kroah-Hartman , Andrew Morton , Mauro Carvalho Chehab , Nicholas Piggin , "open list:DOCUMENTATION" , Markus Heiser , Linux Kernel Mailing List , Frank Rowand , Rob Herring , SeongJae Park , "Yann E. MORIN" On Sun, Sep 10, 2017 at 6:58 AM, Masahiro Yamada wrote: > > "is_reserved_word()" sounds like a boolean function > that returns 1 or 0. > Maybe, the choice of the function name was not nice. Yeah, not great name. That's the old name, though - I didn't change that part, I just changed how it used to return the token structure pointer, which would be NULL when it wasn't a keyword. I actually *should* have made it just return 0 for the "not a keyword" case rather than -1, and that would have ended up being semantically closer to the old use (because you could treat the return value as a boolean, like you could with the token pointer). But it's been literally decades since I used bison/flex, and I didn't remember the rules for 'enum yytokentype', so I just thought "negative numbers for error" was safer. Zero would have been fine, no token can have that number anyway (it just means EOF). And negative wasn't safer, it caused that bug due to the bare boolean use I hadn't noticed. Oh well. Linus