Opened 9 years ago

Closed 9 years ago

Last modified 2 years ago

#5989 closed defect (invalid)

MOHAWK: Global constructors degrades portability

Reported by: fingolfin Owned by:
Priority: normal Component: Engine: Mohawk
Keywords: Cc:
Game:

Description

The MOHAWK engine makes use of global constructors, which reduces portability. Here's the relevant error / warning from clang.

C++ engines/mohawk/livingbooks_code.o ../../engines/mohawk/livingbooks_code.cpp:792:17: error: declaration requires a global constructor [-Werror,-Wglobal-constructors] CodeCommandInfo generalCommandInfo[NUM_GENERAL_COMMANDS] = { ^ ~ ../../engines/mohawk/livingbooks_code.cpp:1338:17: error: declaration requires a global constructor [-Werror,-Wglobal-constructors] CodeCommandInfo itemCommandInfo[NUM_ITEM_COMMANDS] = { ^ ~ 2 errors generated. make: *** [engines/mohawk/livingbooks_code.o] Error 1

Ticket imported from: #3492136. Ticket imported from: bugs/5989.

Change History (3)

comment:1 by fingolfin, 9 years ago

Resolution: invalid
Status: newclosed

comment:2 by fingolfin, 9 years ago

This was with Apple clang version 3.0 (tags/Apple/clang-211.10.1). However, I cannot reproduce this with a current trunk build of clang either, so I am closing this as invalid. Sorry for the confusion!

comment:3 by digitall, 2 years ago

Component: Engine: Mohawk
Note: See TracTickets for help on using tickets.