Opened 15 years ago

Closed 15 years ago

Last modified 6 years ago

#9119 closed patch

create_msvc: Disable language extensions for engines

Reported by: Templier Owned by: bluegr
Priority: normal Component: Tools
Version: Keywords:
Cc: Game:

Description

Project files have language extensions turned on by default. This allows things like enumeration forward declarations to compile fine on MSVC and fail on GCC.

This patch disables language extensions for all engines via the global property file (and turns them back on in the existing special case for the scummvm project file as some seem to used in Windows include files).

After applying the patch, MSVC will throw errors and warnings when language extensions are used. A second patch is needed to fix an error in memorypool.h (identifier not found) and some warnings in the sci engine (formal parameter 'byte' was previously defined as a type).

Tested on Windows with MSVC 9 and Linux with GCC 4.4.1 (OpenSUSE).

Ticket imported from: #2909854. Ticket imported from: patches/1224.

Attachments (3)

create_msvc_disable_language_extensions.patch (2.7 KB ) - added by Templier 15 years ago.
Patch for MSVC
memorypool_identifier_not_found.patch (304 bytes ) - added by Templier 15 years ago.
Patch for memorypool.h
sci_parameter_previously_defined_as_type.patch (1.2 KB ) - added by Templier 15 years ago.
Patch for SCI gui_picture.cpp/h

Download all attachments as: .zip

Change History (9)

by Templier, 15 years ago

Patch for MSVC

by Templier, 15 years ago

Patch for memorypool.h

by Templier, 15 years ago

Patch for SCI gui_picture.cpp/h

comment:1 by fingolfin, 15 years ago

Sounds very useful to me :). The patches to the SCI & common sources also look fine. I can't directly judge the create_mscv changes, but the description at least makes a lot of sense.

Johannes?

comment:2 by fingolfin, 15 years ago

Owner: set to lordhoto

comment:3 by bluegr, 15 years ago

Owner: changed from lordhoto to bluegr
Status: newclosed

comment:4 by bluegr, 15 years ago

I've just tried these patches, and I've improved the changes to the SCI code too (there were other places where variables named "byte" where used). I've applied the other two without modifications, and compilation works fine

(btw sorry for taking this off lordhoto fingolfin, I had started working on this before you replied)

comment:5 by fingolfin, 15 years ago

I don't mind at all. :-)

However, I would like to urge you to assign items to you as soon as you start working on them, to signal this fact; this can help to avoid situations where to people simultaneously work on the same thing (and which thus results in duplicated effort, and frustration for at least one person ;-)

comment:6 by digitall, 6 years ago

Component: Tools
Note: See TracTickets for help on using tickets.