From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by sourceware.org (Postfix) with ESMTPS id 091703858C51 for ; Fri, 1 Jul 2022 21:51:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 091703858C51 Received: by mail-pj1-x1034.google.com with SMTP id cv13so3835134pjb.4 for ; Fri, 01 Jul 2022 14:51:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ILl6+1OniJsKHCMyd2W5BJ4y+AfVdl6w+sJidak4KSk=; b=RZS6kq2ZkUN0ZocYuZj263sNKynaRZtN1f5rz9x+cZt/h75gPc18uPF4t38bjbogz9 lYZ+BHjXKhsoVxM0LIPR/cOyieIZnmbJ+wyw8xK4UAZ44NxuksT2pZ0HLicsy3TuTlD2 rhl5LPIkDn6ffMwp0JL9K2zFjS5E4giOTixdaVl9gZTBpsFz32gwUy5rDO/hlDrxRIDC OeoljXnZWq3Vxe5Eyf9OL2SISe3Dby3xAIN/CpZmuivs6MreRQ9zbzbmcfXvN6iIJPRD 4dWnttnkOWby7DykZpJM+o/jY9jE8mwi4KoxtZIKdEUqsvzJkBVpEY+qLDlwKaiSQg1n pbog== X-Gm-Message-State: AJIora+/Tntp0SV/McBG0X3MGwn6HKhTfPt5tJM61rqxIdr8sNgmtQ31 8J+lBswM0qeHtmaign2znMQ/0yyK13Ue8F7f6tQsEw== X-Google-Smtp-Source: AGRyM1ux0efro7n+gApe5aF2CpXz9Is6iNr1jc59lLNcaKETKvH+2WdqxW5Sr3xbopZjXmGiVSBhniVtzg/PTEhGnaI= X-Received: by 2002:a17:90b:895:b0:1ec:827c:ef0f with SMTP id bj21-20020a17090b089500b001ec827cef0fmr20447949pjb.10.1656712266938; Fri, 01 Jul 2022 14:51:06 -0700 (PDT) MIME-Version: 1.0 References: <20220628010427.1856503-1-cjdb@google.com> In-Reply-To: From: Christopher Di Bella Date: Fri, 1 Jul 2022 14:50:55 -0700 Message-ID: Subject: Re: [PATCH] [PATCH] [gdb] adds `` to list of includes To: Enze Li Cc: gdb-patches@sourceware.org, manojgupta@google.com X-Spam-Status: No, score=-26.7 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, GIT_PATCH_0, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jul 2022 21:51:09 -0000 Hi Enze, `std::back_inserter` is defined in , which isn't included in `gdb/value.c`. Because the C preprocessor imports headers by copy/pasting the contents at the `#include` site, this means that another standard library header is exposing it (presumably ``). We experienced this on ChromeOS, which uses Clang and libc++ to build things. ``` /tmp/portage/sys-devel/gdb-9.2.20200923-r7/work/gdb-9.2/gdb/value.c:1648:52: error: no member named 'back_inserter' in namespace 'std' std::move (iter + 1, all_values.end (), std::back_inserter (result)); ~~~~~^ 1 error generated. ``` On Fri, 1 Jul 2022 at 06:45, Enze Li wrote: > On Tue, 2022-06-28 at 01:04 +0000, Christopher Di Bella via Gdb-patches > wrote: > > `std::back_inserter` is defined in ``, which is currently > > being transitively included by one of the other headers. This is > > causing > > gdb to fail to build on certain platforms, which is fixed by > > explicitly > > including it. > > Hi Christopher, > > I didn't get your point through the commit message. Can you clarify > exactly on which platforms, and what build error you encountered? So > that I can reproduce the issue. > > Thanks, > Enze > > > > --- > > gdb/value.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/gdb/value.c b/gdb/value.c > > index 022fca91a42..ba7ae1a0e18 100644 > > --- a/gdb/value.c > > +++ b/gdb/value.c > > @@ -40,6 +40,7 @@ > > #include "cp-abi.h" > > #include "user-regs.h" > > #include > > +#include > > #include "completer.h" > > #include "gdbsupport/selftest.h" > > #include "gdbsupport/array-view.h" > > -- Kind regards, Christopher Di Bella (he/him/his)