Opened 4 years ago

Closed 4 years ago

Last modified 13 months ago

#10700 closed bug (fixed)

include/stg/Prim.h isn't C++ compatible

Reported by: Fabian Owned by: rasen
Priority: normal Milestone: 7.10.3
Component: Compiler (FFI) Version: 7.10.1
Keywords: FFI, newcomer Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Other Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D1107
Wiki Page:


StgWord hs_cmpxchg8(volatile StgWord8 *x, StgWord old, StgWord new);

and a few other declarations in Prim.h causes problems as they use new as a variable name.

Change History (8)

comment:1 Changed 4 years ago by thomie

Component: Build SystemCompiler (FFI)
Keywords: newcomers added

Maybe you want to write a patch yourself? See the Newcomers info and WorkingConventions/FixingBugs.

comment:2 Changed 4 years ago by rasen

Owner: set to rasen

comment:3 Changed 4 years ago by rasen

Differential Rev(s): Phab:D1107
Status: newpatch

The build fails (, but the failure isn't related to the change.

comment:4 Changed 4 years ago by Ben Gamari <ben@…>

In e7c331af/ghc:

Make headers C++ compatible (fixes #10700)

Some headers used `new` as parameter name, which is reserved word in
C++. This patch changes these names to `new_`.

Test Plan: validate

Reviewers: austin, ezyang, bgamari, simonmar

Reviewed By: simonmar

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #10700

comment:5 Changed 4 years ago by bgamari

Resolution: fixed
Status: patchclosed

comment:6 Changed 4 years ago by simonmar

Milestone: 7.10.3
Status: closedmerge

comment:7 Changed 4 years ago by bgamari

Status: mergeclosed

comment:8 Changed 13 months ago by monoidal

Keywords: newcomer added; newcomers removed
Note: See TracTickets for help on using tickets.