diff mbox series

Unbreak build with --disable-analyzer

Message ID 20201130211942.875427-1-dmalcolm@redhat.com
State New
Headers show
Series Unbreak build with --disable-analyzer | expand

Commit Message

David Malcolm Nov. 30, 2020, 9:19 p.m. UTC
I broke the build with --disable-analyzer with
g:66dde7bc64b75d4a338266333c9c490b12d49825, due to:

../../src/gcc/analyzer/analyzer-pass.cc: In member function 'virtual unsigned int {anonymous}::pass_analyzer::execute(function*)':
../../src/gcc/analyzer/analyzer-pass.cc:86:3: error: 'sorry_no_analyzer' was not declared in this scope
   86 |   sorry_no_analyzer ();
      |   ^~~~~~~~~~~~~~~~~

Fixed by including the relevant header file.

Successfully built stage 1 compiler with and without --disable-analyzer;
full bootstrap in progress; I'll commit it if/when that succeeds.

Spotted by Jeff [CCed]

Sorry about the breakage.

gcc/analyzer/ChangeLog:
	* analyzer-pass.cc: Include "analyzer/analyzer.h" for the
	declaration of sorry_no_analyzer; include "tree.h" and
	"function.h" as these are needed by it.
---
 gcc/analyzer/analyzer-pass.cc | 3 +++
 1 file changed, 3 insertions(+)

Comments

David Malcolm Nov. 30, 2020, 10:39 p.m. UTC | #1
On Mon, 2020-11-30 at 16:19 -0500, David Malcolm wrote:
> I broke the build with --disable-analyzer with
> g:66dde7bc64b75d4a338266333c9c490b12d49825, due to:
> 
> ../../src/gcc/analyzer/analyzer-pass.cc: In member function 'virtual
> unsigned int {anonymous}::pass_analyzer::execute(function*)':
> ../../src/gcc/analyzer/analyzer-pass.cc:86:3: error:
> 'sorry_no_analyzer' was not declared in this scope
>    86 |   sorry_no_analyzer ();
>       |   ^~~~~~~~~~~~~~~~~
> 
> Fixed by including the relevant header file.
> 
> Successfully built stage 1 compiler with and without --disable-
> analyzer;
> full bootstrap in progress; I'll commit it if/when that succeeds.

The full bootstrap succeeded, so I've pushed this.

Dave
Jeff Law Nov. 30, 2020, 10:41 p.m. UTC | #2
On 11/30/20 3:39 PM, David Malcolm wrote:
> On Mon, 2020-11-30 at 16:19 -0500, David Malcolm wrote:
>> I broke the build with --disable-analyzer with
>> g:66dde7bc64b75d4a338266333c9c490b12d49825, due to:
>>
>> ../../src/gcc/analyzer/analyzer-pass.cc: In member function 'virtual
>> unsigned int {anonymous}::pass_analyzer::execute(function*)':
>> ../../src/gcc/analyzer/analyzer-pass.cc:86:3: error:
>> 'sorry_no_analyzer' was not declared in this scope
>>    86 |   sorry_no_analyzer ();
>>       |   ^~~~~~~~~~~~~~~~~
>>
>> Fixed by including the relevant header file.
>>
>> Successfully built stage 1 compiler with and without --disable-
>> analyzer;
>> full bootstrap in progress; I'll commit it if/when that succeeds.
> The full bootstrap succeeded, so I've pushed this.
Thanks.  I'll un-pause the tester and resubmit the failed builds ;-)

jeff
diff mbox series

Patch

diff --git a/gcc/analyzer/analyzer-pass.cc b/gcc/analyzer/analyzer-pass.cc
index 1f65bf8b154..333f87b7897 100644
--- a/gcc/analyzer/analyzer-pass.cc
+++ b/gcc/analyzer/analyzer-pass.cc
@@ -25,6 +25,9 @@  along with GCC; see the file COPYING3.  If not see
 #include "tree-pass.h"
 #include "diagnostic.h"
 #include "options.h"
+#include "tree.h"
+#include "function.h"
+#include "analyzer/analyzer.h"
 #include "analyzer/engine.h"
 
 namespace {