diff mbox series

ada: Fix gcc-interface/misc.cc compilation on SPARC

Message ID ydd5xr91bet.fsf@CeBiTec.Uni-Bielefeld.DE
State New
Headers show
Series ada: Fix gcc-interface/misc.cc compilation on SPARC | expand

Commit Message

Rainer Orth Sept. 6, 2024, 7:36 a.m. UTC
This patch

commit 72c6938f29cbeddb3220720e68add4cf09ffd794
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Sun Aug 25 15:20:59 2024 +0200

    ada: Streamline handling of low-level peculiarities of record field layout

broke the Ada build on SPARC:

In file included from ./tm_p.h:4,
                 from /vol/gcc/src/hg/master/local/gcc/ada/gcc-interface/misc.cc:31:
/vol/gcc/src/hg/master/local/gcc/config/sparc/sparc-protos.h:46:47: error: use of enum ‘memmodel’ without previous declaration
   46 | extern void sparc_emit_membar_for_model (enum memmodel, int, int);
      |                                               ^~~~~~~~

Fixed by including memmodel.h.

Bootstrapped without regressions on sparc-sun-solaris2.11 and
i386-pc-solaris2.11.

Ok for trunk?  I guess this is obvious, though.

	Rainer

Comments

Eric Botcazou Sept. 6, 2024, 8:22 a.m. UTC | #1
> commit 72c6938f29cbeddb3220720e68add4cf09ffd794
> Author: Eric Botcazou <ebotcazou@adacore.com>
> Date:   Sun Aug 25 15:20:59 2024 +0200
> 
>     ada: Streamline handling of low-level peculiarities of record field
> layout
> 
> broke the Ada build on SPARC:
> 
> In file included from ./tm_p.h:4,
>                  from
> /vol/gcc/src/hg/master/local/gcc/ada/gcc-interface/misc.cc:31:
> /vol/gcc/src/hg/master/local/gcc/config/sparc/sparc-protos.h:46:47: error:
> use of enum ‘memmodel’ without previous declaration 46 | extern void
> sparc_emit_membar_for_model (enum memmodel, int, int);
>       |                                               ^~~~~~~~
> 
> Fixed by including memmodel.h.

Sorry about that, a small merge glitch, the fix is already in the pipeline.
Marc Poulhiès Sept. 10, 2024, 8:23 a.m. UTC | #2
Eric Botcazou <botcazou@adacore.com> writes:

>> commit 72c6938f29cbeddb3220720e68add4cf09ffd794
>> Author: Eric Botcazou <ebotcazou@adacore.com>
>> Date:   Sun Aug 25 15:20:59 2024 +0200
>>
>>     ada: Streamline handling of low-level peculiarities of record field
>> layout
>>
>> broke the Ada build on SPARC:
>>
>> In file included from ./tm_p.h:4,
>>                  from
>> /vol/gcc/src/hg/master/local/gcc/ada/gcc-interface/misc.cc:31:
>> /vol/gcc/src/hg/master/local/gcc/config/sparc/sparc-protos.h:46:47: error:
>> use of enum ‘memmodel’ without previous declaration 46 | extern void
>> sparc_emit_membar_for_model (enum memmodel, int, int);
>>       |                                               ^~~~~~~~
>>
>> Fixed by including memmodel.h.
>
> Sorry about that, a small merge glitch, the fix is already in the pipeline.

Hello,

Éric's fix has been merged this morning as r15-3568-g73dc46f47be615.

Marc
diff mbox series

Patch

diff --git a/gcc/ada/gcc-interface/misc.cc b/gcc/ada/gcc-interface/misc.cc
--- a/gcc/ada/gcc-interface/misc.cc
+++ b/gcc/ada/gcc-interface/misc.cc
@@ -28,6 +28,7 @@ 
 #include "coretypes.h"
 #include "target.h"
 #include "tree.h"
+#include "memmodel.h"
 #include "tm_p.h"
 #include "diagnostic.h"
 #include "opts.h"