public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH v2] analyzer: Define INCLUDE_UNIQUE_PTR
@ 2021-09-14  8:35 Maxim Blinov
  2021-09-16 22:38 ` Gerald Pfeifer
  0 siblings, 1 reply; 2+ messages in thread
From: Maxim Blinov @ 2021-09-14  8:35 UTC (permalink / raw)
  To: gcc-patches

Un-break the build for AArch64 Darwin, see PR bootstrap/102242.  Build
fails with log below:

```
In file included from ../../../gcc-master-wip-apple-si/gcc/analyzer/engine.cc:69:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:678:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/stdexcept:239:5: error: no member named 'fancy_abort' in namespace 'std::__1'; did you mean simply 'fancy_abort'?
    _VSTD::abort();
    ^~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:852:15: note: expanded from macro '_VSTD'

../../../gcc-master-wip-apple-si/gcc/system.h:777:13: note: 'fancy_abort' declared here
extern void fancy_abort (const char *, int, const char *)
            ^
```

Judging from the following comment in gcc/system.h, we just need to
define INCLUDE_UNIQUE_PTR since commit eafa9d96923 added the inclusion
of <memory>:

```
/* Some of the headers included by <memory> can use "abort" within a
   namespace, e.g. "_VSTD::abort();", which fails after we use the
   preprocessor to redefine "abort" as "fancy_abort" below.
   Given that unique-ptr.h can use "free", we need to do this after "free"
   is declared but before "abort" is overridden.  */

```

gcc/analyzer/ChangeLog:
	* engine.cc: Define INCLUDE_UNIQUE_PTR.
---
 gcc/analyzer/engine.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/analyzer/engine.cc b/gcc/analyzer/engine.cc
index 24f0931197d..f21f8e5b78a 100644
--- a/gcc/analyzer/engine.cc
+++ b/gcc/analyzer/engine.cc
@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
+#define INCLUDE_UNIQUE_PTR
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-- 
2.30.1 (Apple Git-130)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] analyzer: Define INCLUDE_UNIQUE_PTR
  2021-09-14  8:35 [PATCH v2] analyzer: Define INCLUDE_UNIQUE_PTR Maxim Blinov
@ 2021-09-16 22:38 ` Gerald Pfeifer
  0 siblings, 0 replies; 2+ messages in thread
From: Gerald Pfeifer @ 2021-09-16 22:38 UTC (permalink / raw)
  To: Maxim Blinov; +Cc: gcc-patches, David Malcolm

On Tue, 14 Sep 2021, Maxim Blinov wrote:
> Un-break the build for AArch64 Darwin, see PR bootstrap/102242.  Build
> fails with log below:

David already acked this with

  "Does the patch fix the build for you?

  If so, looks good for trunk.  Please reference PR bootstrap/102242 
  in the ChangeLog entry."

Can you please go ahead and commit this to fix the regression and
bootstrap failure (and add PR bootstrap/102242 to the ChangeLog)?

Oh, I don't see your name in the MAINTAINERS file, so I went ahead
and committed this in your behalf.

(One out of four bootstrap failures gone, hopefully.)

Gerald

PS: It might have made sense to Cc: David on your updated patch and
note that you do not have commit access.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-16 22:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14  8:35 [PATCH v2] analyzer: Define INCLUDE_UNIQUE_PTR Maxim Blinov
2021-09-16 22:38 ` Gerald Pfeifer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).