Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#10511 closed task (fixed)

Simplify some preprocessor expressions

Reported by: Berdes Owned by: Berdes
Priority: low Milestone: 8.0.1
Component: Compiler Version: 7.10.1
Keywords: Cc:
Operating System: Windows Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D981
Wiki Page:

Description (last modified by Berdes)

Some preprocessor expressions can be simplified. For exemple, when _MSC_VER is defined, _WIN32 is also defined.

So #if defined(_MSC_VER) || defined(_WIN32) can be simplified to #if defined(_WIN32).

Change History (6)

comment:1 Changed 4 years ago by Berdes

Description: modified (diff)
Differential Rev(s): D981
Status: newpatch

comment:2 Changed 4 years ago by Thomas Miedema <thomasmiedema@…>

In ce53138ff0d156e9f229d0adab745d2d4cfaf582/ghc:

Delete _MSC_VER when not necessary, fix #10511

Simplify some preprocessor expressions involving `_MSC_VER` because
`_WIN32` is always defined when `_MSC_VER` is.

Differential Revision:

comment:3 Changed 4 years ago by thomie

Milestone: 7.10.2
Resolution: fixed
Status: patchclosed


Feel free to cleanup other things if you see them. First discuss if it would be a very large patch, since we prefer to do those only if they have significant benefit. The problem is that they make it more difficult to use 'git blame' effectively.

comment:4 Changed 4 years ago by thomie

Differential Rev(s): D981Phab:D981
Operating System: Unknown/MultipleWindows

comment:5 Changed 4 years ago by thomie


comment:6 Changed 3 years ago by thoughtpolice


Milestone renamed

Note: See TracTickets for help on using tickets.