From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80868 invoked by alias); 20 Dec 2018 21:39:03 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 80857 invoked by uid 89); 20 Dec 2018 21:39:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:209.85.167.196, H*RU:209.85.167.196, D*polymtl.ca, Hx-languages-length:1813 X-HELO: mail-oi1-f196.google.com Received: from mail-oi1-f196.google.com (HELO mail-oi1-f196.google.com) (209.85.167.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 20 Dec 2018 21:39:01 +0000 Received: by mail-oi1-f196.google.com with SMTP id t204so3143632oie.7 for ; Thu, 20 Dec 2018 13:39:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devkitpro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pidcjJsOWgAPyHOq8k1w42BI37MmAwfhAepP8Ph8m/Q=; b=LbxcDBenENfAhijXcsy/CrazGgGcAkLTZj/51ujOV2uTJaQdH5vHX0gGgfVnppJnLX XtmSxMRRPdl4KTM7MeNhYwQgyD6S0qTNEDJ18mAcycAkkdsQchgPzYwURrCP5T55hQ0g bM0feObwhbRK2nETOyvxO/r/kXemVWnFNK3SE= MIME-Version: 1.0 References: In-Reply-To: From: Dave Murphy Date: Thu, 20 Dec 2018 21:39:00 -0000 Message-ID: Subject: Re: [PATCH] fix compile error with clang To: Simon Marchi Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00240.txt.bz2 Hi Simon, The error I get is ../../binutils-gdb/gdb/unittests/observable-selftests.c:73:31: error: default initialization of an object of const type 'const gdb::observers::token' without a user-provided default constructor const gdb::observers::token token1, token2, token3; ^ {} clang version is davem@devkit-builder:~$ /opt/osx/bin/x86_64-apple-darwin15-clang --version clang version 3.8.1-24 (tags/RELEASE_381/final) Target: x86_64-apple-darwin15 Thread model: posix (targeting 10.9+ host) build machine is debian stretch davem@devkit-builder:~$ uname -a Linux devkit-builder 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux Dave On Thu, Dec 20, 2018 at 7:25 PM Simon Marchi wrote: > > On 2018-12-20 12:25, Dave Murphy wrote: > > Cross compiling for macOS using osxcross gives errors of the form > > "error: default initialization of an object of ... without a > > user-provided default constructor" > > > > Fixed by attached patch, tested compile with mingw-w64, osxcross and > > linux native builds. > > > > 2018-12-20 Dave Murphy > > > > * gdb/dtrace-probe.c (dtrace_static_probe_ops): explicit zero > > initialise. > > * gdb/probe.c (any_static_probe_ops): ditto > > * gdb/record-btrace.c (record_btrace_thread_observer_token): ditto > > * gdb/stap-probe.c (stap_static_probe_ops): ditto > > * gdb/tui/tui-hooks.c (tui_observers_token): ditto > > * gdb/unittests/observable-selftests.c (token1, token2, token3): > > ditto > > Hi Dave, > > Could you mention which exact compiler version you are using (output of > --version), and paste one instance of the exact error message? I'm > trying to see why I don't see this when building with clang natively on > both macOS and Linux. > > Simon