public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Analyzer failure due to missing header
       [not found] <AAF148C8-454E-49B8-8862-F6DDBB4E4F4A@gmail.com>
@ 2023-08-30 21:24 ` FX Coudert
  2023-08-30 21:47   ` David Malcolm
  0 siblings, 1 reply; 2+ messages in thread
From: FX Coudert @ 2023-08-30 21:24 UTC (permalink / raw)
  To: GCC Patches; +Cc: dmalcolm, gcc

[-- Attachment #1: Type: text/plain, Size: 283 bytes --]

> std::max and std::min, introduced by d99d73c77d1e and 2bad0eeb5573, are not available because <algorithm> is not included.

I originally thought this was only seen in cross-compilers, but it actually broke bootstrap on darwin.
Attached patch restores it, OK to commit?

FX


[-- Attachment #2: 0001-Analyzer-include-algorithm-header.patch --]
[-- Type: application/octet-stream, Size: 810 bytes --]

From 4e1e8752549cde215c4afaad19194003aaa54f7f Mon Sep 17 00:00:00 2001
From: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Date: Wed, 30 Aug 2023 23:21:58 +0200
Subject: [PATCH] Analyzer: include algorithm header

gcc/analyzer/ChangeLog:

	* region-model.cc: Define INCLUDE_ALGORITHM.
---
 gcc/analyzer/region-model.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/analyzer/region-model.cc b/gcc/analyzer/region-model.cc
index 4f31a6dcf0f..1ca8c8839bf 100644
--- a/gcc/analyzer/region-model.cc
+++ b/gcc/analyzer/region-model.cc
@@ -20,6 +20,7 @@ along with GCC; see the file COPYING3.  If not see
 
 #include "config.h"
 #define INCLUDE_MEMORY
+#define INCLUDE_ALGORITHM
 #include "system.h"
 #include "coretypes.h"
 #include "make-unique.h"
-- 
2.39.2 (Apple Git-143)


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

* Re: Analyzer failure due to missing header
  2023-08-30 21:24 ` Analyzer failure due to missing header FX Coudert
@ 2023-08-30 21:47   ` David Malcolm
  0 siblings, 0 replies; 2+ messages in thread
From: David Malcolm @ 2023-08-30 21:47 UTC (permalink / raw)
  To: FX Coudert, GCC Patches; +Cc: gcc

On Wed, 2023-08-30 at 23:24 +0200, FX Coudert wrote:
> > std::max and std::min, introduced by d99d73c77d1e and 2bad0eeb5573,
> > are not available because <algorithm> is not included.
> 
> I originally thought this was only seen in cross-compilers, but it
> actually broke bootstrap on darwin.
> Attached patch restores it, OK to commit?

LGTM

Thanks
Dave


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

end of thread, other threads:[~2023-08-30 21:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <AAF148C8-454E-49B8-8862-F6DDBB4E4F4A@gmail.com>
2023-08-30 21:24 ` Analyzer failure due to missing header FX Coudert
2023-08-30 21:47   ` David Malcolm

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).