Opened 8 years ago

Closed 8 years ago

Last modified 19 months ago

#5991 closed defect (invalid)

PARALLACTION: Global constructors degrade portability

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

Description

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

C++ engines/parallaction/parser_br.o ../../engines/parallaction/parser_br.cpp:837:23: error: declaration requires a global constructor [-Werror,-Wglobal-constructors] static ZoneTypeParser parsers[] = { ^ ~ 1 error generated. make: *** [engines/parallaction/parser_br.o] Error 1 C++ engines/parallaction/parser_ns.o ../../engines/parallaction/parser_ns.cpp:1448:23: error: declaration requires a global constructor [-Werror,-Wglobal-constructors] static ZoneTypeParser parsers[] = { ^ ~ 1 error generated. make: *** [engines/parallaction/parser_ns.o] Error 1

C++ engines/parallaction/staticres.o ../../engines/parallaction/staticres.cpp:316:50: error: declaration requires a global constructor [-Werror,-Wglobal-constructors] const Parallaction_ns::Callable Parallaction_ns::_dosCallables[] = { ^ ~ ../../engines/parallaction/staticres.cpp:344:50: error: declaration requires a global constructor [-Werror,-Wglobal-constructors] const Parallaction_ns::Callable Parallaction_ns::_amigaCallables[] = { ^ ~ ../../engines/parallaction/staticres.cpp:374:50: error: declaration requires a global constructor [-Werror,-Wglobal-constructors] const Parallaction_br::Callable Parallaction_br::_dosCallables[] = { ^ ~ ../../engines/parallaction/staticres.cpp:383:50: error: declaration requires a global constructor [-Werror,-Wglobal-constructors] const Parallaction_br::Callable Parallaction_br::_amigaCallables[] = { ^ ~ 4 errors generated.

Ticket imported from: #3492138. Ticket imported from: bugs/5991.

Change History (3)

comment:1 by fingolfin, 8 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:2 by fingolfin, 8 years ago

Resolution: invalid
Status: newclosed

comment:3 by digitall, 19 months ago

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