Opened 21 years ago

Closed 21 years ago

Last modified 6 years ago

#8323 closed patch (fixed)

main.cpp - Fix to compile when no USE_* flag is specified

Reported by: SF/theraraavis Owned by: fingolfin
Priority: normal Component: Port: Win32
Version: Keywords:
Cc: Game:

Description

VC6 compiler would give a syntax error ";" for line 89:

const char *gScummVMFeatures =

as it has preprocessor definitions directly following it (The compiler isn't smart and gets confused.)

Adding empty double quotes would fix this.

const char *gScummVMFeatures = ""

Diff file attached.

Ticket imported from: #893813. Ticket imported from: patches/428.

Attachments (1)

main.cpp.diff (146 bytes ) - added by SF/theraraavis 21 years ago.
Diff file for quick change to main.cpp

Download all attachments as: .zip

Change History (5)

by SF/theraraavis, 21 years ago

Attachment: main.cpp.diff added

Diff file for quick change to main.cpp

comment:1 by fingolfin, 21 years ago

The compiler never gets to see preprocessor statements, they are removed by the preprocessor before the data is fed into the compiler.

However, there *is* an issue here, namely if non of the USE_* flags is specified, then we end up with illegal code (which is probably what you are seeing).

comment:2 by fingolfin, 21 years ago

Owner: set to fingolfin
Resolution: fixed
Status: newclosed
Summary: main.cpp - Fix to compile with no errors in VC6main.cpp - Fix to compile when no USE_* flag is specified

comment:3 by SF/theraraavis, 21 years ago

I definitely gave a bad description. I had none of the USE_* flags specified, so the compiler tried to compile the line

const char *gScummVMFeatures = ;

and that, as you said, is indeed illegal code. Ah, well. Do with it what you will. :-)

comment:4 by digitall, 6 years ago

Component: Port: Win32
Note: See TracTickets for help on using tickets.