[{"id":1767197,"web_url":"http://patchwork.ozlabs.org/comment/1767197/","msgid":"<alpine.DEB.2.20.1709121604370.28643@digraph.polyomino.org.uk>","list_archive_url":null,"date":"2017-09-12T16:06:00","subject":"Re: [C PATCH] field_decl_cmp","submitter":{"id":4349,"url":"http://patchwork.ozlabs.org/api/people/4349/","name":"Joseph Myers","email":"joseph@codesourcery.com"},"content":"On Tue, 12 Sep 2017, Nathan Sidwell wrote:\n\n> Joseph,\n> in moving field_decl_cmp to the C FE, I noticed it checks for NULL DECL_NAMES.\n> Those don't occur.\n\nTo be clear: they don't occur in the case where field_decl_cmp is used; \nthey can occur in other cases.\n\n> This patch removes that checking, and also asserts that when we see\n> identically named decls, exactly one is a TYPE_DECL.\n\nWhen do you get TYPE_DECLs here, for C?  I wouldn't expect them to be \npossible.","headers":{"Return-Path":"<gcc-patches-return-461955-incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list gcc-patches@gcc.gnu.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-461955-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"uL45FiAc\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xs8mX6ttmz9s7g\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 02:06:20 +1000 (AEST)","(qmail 121611 invoked by alias); 12 Sep 2017 16:06:12 -0000","(qmail 121575 invoked by uid 89); 12 Sep 2017 16:06:11 -0000","from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131)\n\tby sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with\n\tESMTP; Tue, 12 Sep 2017 16:06:10 +0000","from nat-ies.mentorg.com ([192.94.31.2]\n\thelo=svr-ies-mbx-01.mgc.mentorg.com)\tby relay1.mentorg.com\n\twith esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256)\tid\n\t1drnhP-0001K0-T6 from joseph_myers@mentor.com ;\n\tTue, 12 Sep 2017 09:06:07 -0700","from digraph.polyomino.org.uk (137.202.0.87) by\n\tsvr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft\n\tSMTP Server (TLS) id 15.0.1263.5; Tue, 12 Sep 2017 17:06:04 +0100","from jsm28 (helo=localhost)\tby digraph.polyomino.org.uk with\n\tlocal-esmtp (Exim 4.86_2)\t(envelope-from\n\t<joseph@codesourcery.com>)\tid 1drnhI-0007Eg-Bk;\n\tTue, 12 Sep 2017 16:06:00 +0000"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:date\n\t:from:to:cc:subject:in-reply-to:message-id:references\n\t:mime-version:content-type; q=dns; s=default; b=AiDwSHHfcUtfa5Y8\n\tTvr850/SORVfYUNGZI5ww/jdclwFeZx1XknyNgTkV+nK6dUFF9kFu6kzMiuunlZk\n\taFjLKCWDImXj/uWigw/5QRfRxzG3yG+el13wkwe6rpE9GmYhtMgM71e993BhEDya\n\tBoDA7lTmjs26OUr+4sJ2QHKoU+M=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:date\n\t:from:to:cc:subject:in-reply-to:message-id:references\n\t:mime-version:content-type; s=default; bh=r+Xy1VXJbDtqkjjwG8rjzK\n\td4mi4=; b=uL45FiAc3esF26jXwlF2q5IkpYnfSTyl500mYx9vZHwtUFHS3WgUma\n\tqwFPGREO+eJSofz3YEwJbJ4LQavCWzU6v7zhj+padK3tD69VkQfsQJ4dJWG95HY0\n\tZ3MwX7++L5tyBhrFps4xiEY5Rt8lcx8zr9sWRBweiuJXOceCIZ5RU=","Mailing-List":"contact gcc-patches-help@gcc.gnu.org; run by ezmlm","Precedence":"bulk","List-Id":"<gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>","List-Archive":"<http://gcc.gnu.org/ml/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-help@gcc.gnu.org>","Sender":"gcc-patches-owner@gcc.gnu.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-2.0 required=5.0 tests=AWL, BAYES_00,\n\tRCVD_IN_DNSWL_NONE, SPF_PASS,\n\tURIBL_RED autolearn=ham version=3.3.2 spammy=","X-HELO":"relay1.mentorg.com","Date":"Tue, 12 Sep 2017 16:06:00 +0000","From":"Joseph Myers <joseph@codesourcery.com>","To":"Nathan Sidwell <nathan@acm.org>","CC":"GCC Patches <gcc-patches@gcc.gnu.org>","Subject":"Re: [C PATCH] field_decl_cmp","In-Reply-To":"<68b46c41-a333-7273-fe12-ae395d642ccb@acm.org>","Message-ID":"<alpine.DEB.2.20.1709121604370.28643@digraph.polyomino.org.uk>","References":"<68b46c41-a333-7273-fe12-ae395d642ccb@acm.org>","User-Agent":"Alpine 2.20 (DEB 67 2015-01-07)","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"US-ASCII\"","X-ClientProxiedBy":"svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To\n\tsvr-ies-mbx-01.mgc.mentorg.com (139.181.222.1)"}},{"id":1767235,"web_url":"http://patchwork.ozlabs.org/comment/1767235/","msgid":"<81b99d27-33a7-781d-9222-07abf12db989@acm.org>","list_archive_url":null,"date":"2017-09-12T16:41:42","subject":"Re: [C PATCH] field_decl_cmp","submitter":{"id":9970,"url":"http://patchwork.ozlabs.org/api/people/9970/","name":"Nathan Sidwell","email":"nathan@acm.org"},"content":"On 09/12/2017 12:06 PM, Joseph Myers wrote:\n> On Tue, 12 Sep 2017, Nathan Sidwell wrote:\n\n>> This patch removes that checking, and also asserts that when we see\n>> identically named decls, exactly one is a TYPE_DECL.\n> \n> When do you get TYPE_DECLs here, for C?  I wouldn't expect them to be\n> possible.\n>\n\noh, of course (C is so primitive!).  This patch survives a bootstrap, ok?\n\nnathan","headers":{"Return-Path":"<gcc-patches-return-461966-incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list gcc-patches@gcc.gnu.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-461966-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"EJmxpeR0\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xs9Z44XtSz9s82\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 02:42:19 +1000 (AEST)","(qmail 27674 invoked by alias); 12 Sep 2017 16:41:48 -0000","(qmail 27579 invoked by uid 89); 12 Sep 2017 16:41:47 -0000","from mail-yw0-f178.google.com (HELO mail-yw0-f178.google.com)\n\t(209.85.161.178) by sourceware.org\n\t(qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tTue, 12 Sep 2017 16:41:46 +0000","by mail-yw0-f178.google.com with SMTP id v72so27338673ywa.3 for\n\t<gcc-patches@gcc.gnu.org>; Tue, 12 Sep 2017 09:41:46 -0700 (PDT)","from ?IPv6:2620:10d:c0a3:20fb:7500:e7fb:4a6f:2254?\n\t([2620:10d:c091:200::a68b]) by smtp.googlemail.com with\n\tESMTPSA id t206sm4029060ywc.95.2017.09.12.09.41.43\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256\n\tbits=128/128); Tue, 12 Sep 2017 09:41:43 -0700 (PDT)"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender\n\t:subject:to:cc:references:from:message-id:date:mime-version\n\t:in-reply-to:content-type; q=dns; s=default; b=piHJGzVF2gDtwUckM\n\tvwiK7K03xDUqqm/hc4/MostlqHtiIlnnVRaHfqRl5E7jdLmesrSfilx+EO3Mpy80\n\tp0HW9oIvAKqB2F1Ace5OH0ZseR7Frc1EF+o75eSko9j+RvGdchrTHumtGscT19Er\n\tgjpW341XWmPnZKA1/DbUjKTgj4=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender\n\t:subject:to:cc:references:from:message-id:date:mime-version\n\t:in-reply-to:content-type; s=default; bh=w6aFkStPe1BhKTNYK757hq2\n\tgTZs=; b=EJmxpeR0Wlko0yh0BCq0XIOFgTEdN+z69HHaDROK4pi2gY4maEywM9Z\n\tb0YcugDT1loR/J0fN3k+Ksm93GPueBNjHWbVL6f0BT3HUTcOGX4O+S/vpKEVy5QG\n\tPR4GLin7WmzcTJWIgq5aA0XKZN2LoEnH1fwkPDMc9Oh0XzfPq/ws=","Mailing-List":"contact gcc-patches-help@gcc.gnu.org; run by ezmlm","Precedence":"bulk","List-Id":"<gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>","List-Archive":"<http://gcc.gnu.org/ml/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-help@gcc.gnu.org>","Sender":"gcc-patches-owner@gcc.gnu.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-11.4 required=5.0 tests=BAYES_00,\n\tFREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE,\n\tRCVD_IN_SORBS_SPAM,\n\tSPF_PASS autolearn=ham version=3.3.2 spammy=H*M:33a7","X-HELO":"mail-yw0-f178.google.com","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net;\n\ts=20161025;\n\th=x-gm-message-state:sender:subject:to:cc:references:from:message-id\n\t:date:user-agent:mime-version:in-reply-to:content-language;\n\tbh=tIDpQvNq6gY5/l2HBWaXRdhAgpzVHLw5pQBWV0+psLU=;\n\tb=rVcg1Udcy3u5stny3EidmuiDE/Lgi265v+1sI/3EQIVsyw4YYbHcDGmfk0OSVito/h\n\tjYxa6NMtRduTNw65TT/G+TbPUWYpdpwcd8Uu4iVugF2MuGCUSNJc68YxJw0Vb8EJwwnV\n\t2IXB1RFdD3rU+N5blBnnJ/5TLDVgFfs1X3fx/PJbzU6ntmueMdB+1YXiTnn2EXurb0ZO\n\tMdEFwq7sQ1x1Vyo82xwc5AiR/mi3l7dtmt3iTRZh0f1B8owsQaneXX5aH3kn1Wz0sO09\n\tfdVdpC9cYSojq+lUGwQf2mwTwNeWz7XVhvlJQb5MCpaWcOozoAodJCG49p0fwGyOiu5p\n\tbE0w==","X-Gm-Message-State":"AHPjjUjJJn557n0ehqqnbeHImGWJoHrZUJhpcdkXMKKXfYWNpM3rgQHt\tZTHdPtz1AIkyqIqZ","X-Google-Smtp-Source":"ADKCNb7MUdgdvDt8V0fEDYEHqEJG2PvUOuZ+m8gUlZRUQ1h38BAzODALPk1jqszAZPyl2ZE4sw43/A==","X-Received":"by 10.129.113.3 with SMTP id m3mr13927405ywc.255.1505234504505;\n\tTue, 12 Sep 2017 09:41:44 -0700 (PDT)","Subject":"Re: [C PATCH] field_decl_cmp","To":"Joseph Myers <joseph@codesourcery.com>","Cc":"GCC Patches <gcc-patches@gcc.gnu.org>","References":"<68b46c41-a333-7273-fe12-ae395d642ccb@acm.org>\n\t<alpine.DEB.2.20.1709121604370.28643@digraph.polyomino.org.uk>","From":"Nathan Sidwell <nathan@acm.org>","Message-ID":"<81b99d27-33a7-781d-9222-07abf12db989@acm.org>","Date":"Tue, 12 Sep 2017 12:41:42 -0400","User-Agent":"Mozilla/5.0 (X11; Linux x86_64;\n\trv:52.0) Gecko/20100101 Thunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<alpine.DEB.2.20.1709121604370.28643@digraph.polyomino.org.uk>","Content-Type":"multipart/mixed;\n\tboundary=\"------------71CCC184242584E027C0446C\""}},{"id":1767240,"web_url":"http://patchwork.ozlabs.org/comment/1767240/","msgid":"<alpine.DEB.2.20.1709121646290.28643@digraph.polyomino.org.uk>","list_archive_url":null,"date":"2017-09-12T16:48:06","subject":"Re: [C PATCH] field_decl_cmp","submitter":{"id":4349,"url":"http://patchwork.ozlabs.org/api/people/4349/","name":"Joseph Myers","email":"joseph@codesourcery.com"},"content":"On Tue, 12 Sep 2017, Nathan Sidwell wrote:\n\n> On 09/12/2017 12:06 PM, Joseph Myers wrote:\n> > On Tue, 12 Sep 2017, Nathan Sidwell wrote:\n> \n> > > This patch removes that checking, and also asserts that when we see\n> > > identically named decls, exactly one is a TYPE_DECL.\n> > \n> > When do you get TYPE_DECLs here, for C?  I wouldn't expect them to be\n> > possible.\n> > \n> \n> oh, of course (C is so primitive!).  This patch survives a bootstrap, ok?\n\nI'd be concerned about the possibility of a qsort implementation that \ncalls the comparison function with two pointers to the same object (as far \nas I can tell, it's valid for qsort to do that).  That is, I think you \nneed to check for the two DECLs being the same DECL, before asserting \ntheir names are different.","headers":{"Return-Path":"<gcc-patches-return-461968-incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list gcc-patches@gcc.gnu.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-461968-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"RoXGXpw2\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xs9jQ61gtz9s82\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 02:48:41 +1000 (AEST)","(qmail 73681 invoked by alias); 12 Sep 2017 16:48:26 -0000","(qmail 73555 invoked by uid 89); 12 Sep 2017 16:48:21 -0000","from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131)\n\tby sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with\n\tESMTP; Tue, 12 Sep 2017 16:48:19 +0000","from nat-ies.mentorg.com ([192.94.31.2]\n\thelo=svr-ies-mbx-01.mgc.mentorg.com)\tby relay1.mentorg.com\n\twith esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256)\tid\n\t1droMA-0003Zh-4I from joseph_myers@mentor.com ;\n\tTue, 12 Sep 2017 09:48:14 -0700","from digraph.polyomino.org.uk (137.202.0.87) by\n\tsvr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft\n\tSMTP Server (TLS) id 15.0.1263.5; Tue, 12 Sep 2017 17:48:10 +0100","from jsm28 (helo=localhost)\tby digraph.polyomino.org.uk with\n\tlocal-esmtp (Exim 4.86_2)\t(envelope-from\n\t<joseph@codesourcery.com>)\tid 1droM2-0007t9-GV;\n\tTue, 12 Sep 2017 16:48:06 +0000"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:date\n\t:from:to:cc:subject:in-reply-to:message-id:references\n\t:mime-version:content-type; q=dns; s=default; b=b/1h0IMHw3P0uVKy\n\tGmn/M9aJ7Pxokwn/MEUeSrMgdv0SQyyYGk+1DxP76ifLag2J3S7jknqmIltmnnmq\n\tnavIcl6uomTfsuBUGzHlFEy95gkh7lOrKlubcoMjIusb9tBws9E+42g69bt4lvuV\n\t3ympWYPvxPqdWKu99tx6rrcDYp8=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:date\n\t:from:to:cc:subject:in-reply-to:message-id:references\n\t:mime-version:content-type; s=default; bh=/LzyZOr17T8NHK1d0d9ObN\n\tPFiAM=; b=RoXGXpw2ejUgAjMRBEM62jxg+3Z7+t7jGfP8pSZp4cd20pitW7MzXu\n\tomH6aHdqjHUaV+kGoCKFfKhA5RGQ5P8e5QjrX5S2I3WHcIF+IZseBDVxxqu06BHu\n\tP6NAq35m/GpFwp0m9xiMf4jZb/VZvDKE/sLFt+Wt7jP4Bi3jAsbl0=","Mailing-List":"contact gcc-patches-help@gcc.gnu.org; run by ezmlm","Precedence":"bulk","List-Id":"<gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>","List-Archive":"<http://gcc.gnu.org/ml/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-help@gcc.gnu.org>","Sender":"gcc-patches-owner@gcc.gnu.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-2.0 required=5.0 tests=AWL, BAYES_00,\n\tRCVD_IN_DNSWL_NONE, SPF_PASS,\n\tURIBL_RED autolearn=ham version=3.3.2 spammy=","X-HELO":"relay1.mentorg.com","Date":"Tue, 12 Sep 2017 16:48:06 +0000","From":"Joseph Myers <joseph@codesourcery.com>","To":"Nathan Sidwell <nathan@acm.org>","CC":"GCC Patches <gcc-patches@gcc.gnu.org>","Subject":"Re: [C PATCH] field_decl_cmp","In-Reply-To":"<81b99d27-33a7-781d-9222-07abf12db989@acm.org>","Message-ID":"<alpine.DEB.2.20.1709121646290.28643@digraph.polyomino.org.uk>","References":"<68b46c41-a333-7273-fe12-ae395d642ccb@acm.org>\n\t<alpine.DEB.2.20.1709121604370.28643@digraph.polyomino.org.uk>\n\t<81b99d27-33a7-781d-9222-07abf12db989@acm.org>","User-Agent":"Alpine 2.20 (DEB 67 2015-01-07)","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"US-ASCII\"","X-ClientProxiedBy":"svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To\n\tsvr-ies-mbx-01.mgc.mentorg.com (139.181.222.1)"}},{"id":1769330,"web_url":"http://patchwork.ozlabs.org/comment/1769330/","msgid":"<4aa82151-e61e-cbf7-35db-2d91f8547e27@acm.org>","list_archive_url":null,"date":"2017-09-15T17:43:53","subject":"Re: [C PATCH] field_decl_cmp","submitter":{"id":9970,"url":"http://patchwork.ozlabs.org/api/people/9970/","name":"Nathan Sidwell","email":"nathan@acm.org"},"content":"On 09/12/2017 12:48 PM, Joseph Myers wrote:\n\n> I'd be concerned about the possibility of a qsort implementation that\n> calls the comparison function with two pointers to the same object (as far\n> as I can tell, it's valid for qsort to do that).  That is, I think you\n> need to check for the two DECLs being the same DECL, before asserting\n> their names are different.\n\nI suppose we can drop the assert.  That does leave it returning +1 in \nthe case you're concerned about, but I don't really see the need to tell \nsuch a stupid qsort that the things are unordered.\n\nnathan","headers":{"Return-Path":"<gcc-patches-return-462293-incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list gcc-patches@gcc.gnu.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-462293-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"oPJC6YHo\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xv2p00MhGz9s7c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 16 Sep 2017 03:44:07 +1000 (AEST)","(qmail 97871 invoked by alias); 15 Sep 2017 17:43:59 -0000","(qmail 97849 invoked by uid 89); 15 Sep 2017 17:43:58 -0000","from mail-yw0-f181.google.com (HELO mail-yw0-f181.google.com)\n\t(209.85.161.181) by sourceware.org\n\t(qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tFri, 15 Sep 2017 17:43:57 +0000","by mail-yw0-f181.google.com with SMTP id x131so1863996ywa.10 for\n\t<gcc-patches@gcc.gnu.org>; Fri, 15 Sep 2017 10:43:56 -0700 (PDT)","from ?IPv6:2620:10d:c0a3:20fb:7500:e7fb:4a6f:2254?\n\t([2620:10d:c091:200::2:f7]) by smtp.googlemail.com with\n\tESMTPSA id l2sm493401ywh.23.2017.09.15.10.43.54\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256\n\tbits=128/128); Fri, 15 Sep 2017 10:43:54 -0700 (PDT)"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender\n\t:subject:to:cc:references:from:message-id:date:mime-version\n\t:in-reply-to:content-type; q=dns; s=default; b=i9n9imDHe0SJxK2mc\n\tfho5RqXRFZbkkIalliw2bPsW6dFI5bjq50XXannnMx0P5cC7L05oGtzA4U2J7Eyg\n\ttSgWiTC244EGd6WEsOsHPiIRF7Rul/ToS/lX0Bz7T86o6CHkRSzZTZ1KJQJnjrMi\n\tP7zYQezNcCkmv8TpIyyXD726nU=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender\n\t:subject:to:cc:references:from:message-id:date:mime-version\n\t:in-reply-to:content-type; s=default; bh=x7Fu38VQwC8rLHkmEVnlKkF\n\tI8dc=; b=oPJC6YHoVmurQrl6cNEOnBN4QMuA9JoHR2fv6uzXaW4iZYl3VwiMna7\n\t4DJgcFnrNnnrYBBQLsTY/YOkiQDQXekLRneIGd7kv/hAt1jxwKXxH76/3rgimj/E\n\tV/7n7qxdVtQXYovtymG4xaDbdseJALVoVGpUignTldDtszeqLP6w=","Mailing-List":"contact gcc-patches-help@gcc.gnu.org; run by ezmlm","Precedence":"bulk","List-Id":"<gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>","List-Archive":"<http://gcc.gnu.org/ml/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-help@gcc.gnu.org>","Sender":"gcc-patches-owner@gcc.gnu.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-11.4 required=5.0 tests=BAYES_00,\n\tFREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE,\n\tRCVD_IN_SORBS_SPAM,\n\tSPF_PASS autolearn=ham version=3.3.2 spammy=","X-HELO":"mail-yw0-f181.google.com","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net;\n\ts=20161025;\n\th=x-gm-message-state:sender:subject:to:cc:references:from:message-id\n\t:date:user-agent:mime-version:in-reply-to:content-language;\n\tbh=ABwLsHzBCWEGXJWg0yKxj+Sr0msr1/UImmu7lfocDCc=;\n\tb=qfDAJZ4sNZpTsh+s5yF7kqylM9S0Vb9kbOoBfUGtyJ79A0jmqkl1Zq+h/uSWHMvOPy\n\tHNwF4zuAv9Z2JFB5RZIJ63z3GDTaWbcIrc8MRsn3OSaSB49fXrSOvKtRE+PQ8qCnLSbG\n\tC2KZUcgI5nAfEKjfosgSmtTX56Q7vpUWMNMB1q3QRGVgFkngxjWd0bTZs99JN46C+1jI\n\tOv7l+nrVub6FfZTxeyuFWbL8Ixe7/sTLNkoerrOurEb3Bu2O8lmCWWTOth4n8I9jLSTD\n\t3XwDFU9XCPfCfiEVtVyxvMVUnGppE1+fAhAhP1UuYc62ET/URf+c6vKZ2JB712RXFHyb\n\tPLyA==","X-Gm-Message-State":"AHPjjUjmgaEGRzxHRMgz72tnnYQjt5O1iIaIXqm7KDd0NfjIecpzCU0P\tEPSJZyFvG0UQ08KH","X-Google-Smtp-Source":"ADKCNb6iZwCnHbYlh2khgXmctxejD2zqCVoFnWPtddpuchDdjP2ZX3dVVUT01bKlPDYmdb4mNYwWSg==","X-Received":"by 10.129.131.19 with SMTP id t19mr22195987ywf.33.1505497435414;\n\tFri, 15 Sep 2017 10:43:55 -0700 (PDT)","Subject":"Re: [C PATCH] field_decl_cmp","To":"Joseph Myers <joseph@codesourcery.com>","Cc":"GCC Patches <gcc-patches@gcc.gnu.org>","References":"<68b46c41-a333-7273-fe12-ae395d642ccb@acm.org>\n\t<alpine.DEB.2.20.1709121604370.28643@digraph.polyomino.org.uk>\n\t<81b99d27-33a7-781d-9222-07abf12db989@acm.org>\n\t<alpine.DEB.2.20.1709121646290.28643@digraph.polyomino.org.uk>","From":"Nathan Sidwell <nathan@acm.org>","Message-ID":"<4aa82151-e61e-cbf7-35db-2d91f8547e27@acm.org>","Date":"Fri, 15 Sep 2017 13:43:53 -0400","User-Agent":"Mozilla/5.0 (X11; Linux x86_64;\n\trv:52.0) Gecko/20100101 Thunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<alpine.DEB.2.20.1709121646290.28643@digraph.polyomino.org.uk>","Content-Type":"multipart/mixed;\n\tboundary=\"------------CD314CAA47D9D0258D25182B\""}},{"id":1769335,"web_url":"http://patchwork.ozlabs.org/comment/1769335/","msgid":"<alpine.DEB.2.20.1709151748120.5338@digraph.polyomino.org.uk>","list_archive_url":null,"date":"2017-09-15T17:50:51","subject":"Re: [C PATCH] field_decl_cmp","submitter":{"id":4349,"url":"http://patchwork.ozlabs.org/api/people/4349/","name":"Joseph Myers","email":"joseph@codesourcery.com"},"content":"On Fri, 15 Sep 2017, Nathan Sidwell wrote:\n\n> On 09/12/2017 12:48 PM, Joseph Myers wrote:\n> \n> > I'd be concerned about the possibility of a qsort implementation that\n> > calls the comparison function with two pointers to the same object (as far\n> > as I can tell, it's valid for qsort to do that).  That is, I think you\n> > need to check for the two DECLs being the same DECL, before asserting\n> > their names are different.\n> \n> I suppose we can drop the assert.  That does leave it returning +1 in the case\n> you're concerned about, but I don't really see the need to tell such a stupid\n> qsort that the things are unordered.\n\nI don't know what such a qsort would do if such a case returned 1; my \npresumption is that all our comparison functions ought to return 0 when \ntwo objects are equal, even if that can only be if they are the same \nobject.  It's OK with a return of 0 if x == y (or if DECL_NAME (x) == \nDECL_NAME (y), whichever you think appropriate).","headers":{"Return-Path":"<gcc-patches-return-462295-incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list gcc-patches@gcc.gnu.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-462295-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"U3tZwC0S\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xv2y93mNjz9sRm\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 16 Sep 2017 03:51:12 +1000 (AEST)","(qmail 124931 invoked by alias); 15 Sep 2017 17:51:03 -0000","(qmail 124805 invoked by uid 89); 15 Sep 2017 17:51:02 -0000","from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131)\n\tby sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with\n\tESMTP; Fri, 15 Sep 2017 17:51:00 +0000","from nat-ies.mentorg.com ([192.94.31.2]\n\thelo=svr-ies-mbx-01.mgc.mentorg.com)\tby relay1.mentorg.com\n\twith esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256)\tid\n\t1dsulW-00043L-SK from joseph_myers@mentor.com ;\n\tFri, 15 Sep 2017 10:50:58 -0700","from digraph.polyomino.org.uk (137.202.0.87) by\n\tsvr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft\n\tSMTP Server (TLS) id 15.0.1263.5; Fri, 15 Sep 2017 18:50:55 +0100","from jsm28 (helo=localhost)\tby digraph.polyomino.org.uk with\n\tlocal-esmtp (Exim 4.86_2)\t(envelope-from\n\t<joseph@codesourcery.com>)\tid 1dsulP-00038i-OS;\n\tFri, 15 Sep 2017 17:50:51 +0000"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:date\n\t:from:to:cc:subject:in-reply-to:message-id:references\n\t:mime-version:content-type; q=dns; s=default; b=Z7O+/7i3gX2xddLc\n\t+drvnPGiHEfp3ib8idMPQZKL20EHdrLtbY0sG0Opczvqv7P6MeA3WOUGgd/wnuWQ\n\td/SpvkhzkWbEvenl/CqKr7l7H5XXSTNPvGoxvy8wR0fCNt6ATn1xlf047XOlXv7g\n\tphE4h2jHTTXZP6dmSoW8eS6wMrA=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:date\n\t:from:to:cc:subject:in-reply-to:message-id:references\n\t:mime-version:content-type; s=default; bh=hC7aN2uGOcEC1g3llc3Fa3\n\tjcTI8=; b=U3tZwC0SKgRIPJly6QVysZDJEAjlhBwKzwEqbrCM8D+/wtscWhcl41\n\tuRMln2V3z4NbnVm8ONVUZi7wn1effVV34/WPtk92VDI/nre31dcid8fTbWusr7SL\n\tXl621Ka0ir1ziT4s4b3zn4Qf9wppRtccjJFNyTEf+MmX1CwH7dJzk=","Mailing-List":"contact gcc-patches-help@gcc.gnu.org; run by ezmlm","Precedence":"bulk","List-Id":"<gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>","List-Archive":"<http://gcc.gnu.org/ml/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-help@gcc.gnu.org>","Sender":"gcc-patches-owner@gcc.gnu.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-2.0 required=5.0 tests=AWL, BAYES_00,\n\tRCVD_IN_DNSWL_NONE, SPF_PASS,\n\tURIBL_RED autolearn=ham version=3.3.2 spammy=Hx-languages-length:1029,\n\tour","X-HELO":"relay1.mentorg.com","Date":"Fri, 15 Sep 2017 17:50:51 +0000","From":"Joseph Myers <joseph@codesourcery.com>","To":"Nathan Sidwell <nathan@acm.org>","CC":"GCC Patches <gcc-patches@gcc.gnu.org>","Subject":"Re: [C PATCH] field_decl_cmp","In-Reply-To":"<4aa82151-e61e-cbf7-35db-2d91f8547e27@acm.org>","Message-ID":"<alpine.DEB.2.20.1709151748120.5338@digraph.polyomino.org.uk>","References":"<68b46c41-a333-7273-fe12-ae395d642ccb@acm.org>\n\t<alpine.DEB.2.20.1709121604370.28643@digraph.polyomino.org.uk>\n\t<81b99d27-33a7-781d-9222-07abf12db989@acm.org>\n\t<alpine.DEB.2.20.1709121646290.28643@digraph.polyomino.org.uk>\n\t<4aa82151-e61e-cbf7-35db-2d91f8547e27@acm.org>","User-Agent":"Alpine 2.20 (DEB 67 2015-01-07)","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"US-ASCII\"","X-ClientProxiedBy":"svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To\n\tsvr-ies-mbx-01.mgc.mentorg.com (139.181.222.1)"}}]