From owner-freebsd-current@freebsd.org Fri Jun 8 23:08:28 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E94EFDD0BE for ; Fri, 8 Jun 2018 23:08:28 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic307-10.consmr.mail.gq1.yahoo.com (sonic307-10.consmr.mail.gq1.yahoo.com [98.137.64.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAEEA768D7 for ; Fri, 8 Jun 2018 23:08:27 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 5I6pL_cVM1mehT8hGmBEY.eTIkgpwvy6Jy2fISbYW4L0WBjPpIdg023XpbQOI05 2h_ZnVwamKDqm4Xp8dtzglki75YQwO0jfNBpDSddFDK0NJND5dgV6IhzW9XC78dFLasR__1axXWS deQosDhYOTcEBcZmcPQcBcWsKuB4PiA8Pqk50hqsJn102IBRsfKP3JWktktjt5MPj6tJo5rHzHdA sBXcO0y5yuzlGgohQ11RIP9Dd2rGy7e6QwzR1hvbqbM6CM9W8PhMnDP3tf99gPZO.Fwz4Wu.4DLo HNT2xn4CNkz3PhqKEFgQnjCB46W8uvd_REWAArJFyS9.OQ0uFbtzSdvz3zWq3aqh_buKe0Nmmp9C lJV1R31pDVq1XPtKNb7X0WJbpKZI1kUslib7rf34HeyipfKwMu_5GQBZu3s6qu7hxnikKNNr86Z7 wpXbGFo3S9xNViKjo6sJy3lasPKp3fSOAsxWdksA9YHM0OdvQy5pj3o1RLfwtAFMfKHVqtutLm6X Hd4VNQDvMm1XvVaMgzUgRv7kM6Kaw54ycqOIiktcRyVnqGJy5VjdLPriEwOeQrITZ3sEvJvQ4Qkm wGZ3SdFCQ263BNQ9ortNQ238RgZFJgFqKPY67dHWIumfOH4.9lb3NI2tor2NMPJOv4qTJdvszXbu GoPIyWzO4W407jvJrFnEbxh6jWzKrizfW5NFeyb9NL_TwH1OuwwDZ.0Q6ky8m_AqEmxuN1_mHdLz LHMbeQzNDdliTDO5OfYK6f9Zhq8DpINZotXo7B_cbSD6_qi2XbSMCF9YFt1HbfZUaM0SOjNC5ai1 pA1sEt7p6CJ4YgZMtSyV.28YTmxnrWR0HqiKWyqy4Yz5W01hF4F_tYs2gTu9uwfodZLcVUTbbj.A VZxgoHRLcdJnYAoGtyLteZ7PNAAjGbXQ5CdfWYeCvPWkwjKEANN1tzgQks57G6.7EKz0Rs.jx9pl PlA_a_gfhEIQ- Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.gq1.yahoo.com with HTTP; Fri, 8 Jun 2018 23:08:21 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.109]) ([70.189.131.151]) by smtp419.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 11ec90c7def69534568e6d8a26998e49; Fri, 08 Jun 2018 23:08:18 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: head -r334749 breaks the FreeBSD-head-amd64-gcc ci.freebsd.org build [via pmc.h struct's having constructors in C++] Message-Id: Date: Fri, 8 Jun 2018 16:08:16 -0700 To: mmacy@FreeBSD.org, FreeBSD Current X-Mailer: Apple Mail (2.3445.8.2) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2018 23:08:28 -0000 [Note other build failures stopped builds before the below before this was run into. Now those pass to reach the below.] ci.free.bsd.org has FreeBSD-head-amd64-gcc failing for: --- libpmc_json.o --- In file included from /workspace/src/lib/libpmc/libpmc_json.cc:39:0: /workspace/src/lib/libpmc/pmc.h:102:53: error: 'int pmc_cpuinfo(const = pmc_cpuinfo**)' hides constructor for 'struct pmc_cpuinfo' = [-Werror=3Dshadow] int pmc_cpuinfo(const struct pmc_cpuinfo **_cpu_info); ^ /workspace/src/lib/libpmc/pmc.h:103:57: error: 'int pmc_pmcinfo(int, = pmc_pmcinfo**)' hides constructor for 'struct pmc_pmcinfo' = [-Werror=3Dshadow] int pmc_pmcinfo(int _cpu, struct pmc_pmcinfo **_pmc_info); ^ With the .cc (so C++ context) the name of a struct is also the name of the constructor for the struct. Having subroutines with that name name ends up with the name shadowing the C++ constructor. The builds are set up to reject such. The struct's in pmc.h are: struct pmc_cpuinfo { enum pmc_cputype pm_cputype; /* the kind of CPU */ uint32_t pm_ncpu; /* number of CPUs */ uint32_t pm_npmc; /* #PMCs per CPU */ uint32_t pm_nclass; /* #classes of PMCs */ struct pmc_classinfo pm_classes[PMC_CLASS_MAX]; }; and: struct pmc_pmcinfo { int32_t pm_cpu; /* CPU number */ struct pmc_info pm_pmcs[]; /* NPMC structs */ }; =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)