(svn r16492) -Remove: support for gcc2. It hasn't been able to compile OTTD for months. All attempts to do another workaround failed.

This commit is contained in:
smatz
2009-06-01 11:49:46 +00:00
parent bab70a823d
commit c03ce4b1c7
15 changed files with 24 additions and 80 deletions

View File

@@ -12,7 +12,7 @@ class Blitter_32bppOptimized : public Blitter_32bppSimple {
public:
struct SpriteData {
uint32 offset[ZOOM_LVL_COUNT][2];
byte data[VARARRAY_SIZE];
byte data[];
};
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);

View File

@@ -12,7 +12,7 @@ class Blitter_8bppOptimized : public Blitter_8bppBase {
public:
struct SpriteData {
uint32 offset[ZOOM_LVL_COUNT]; ///< offsets (from .data) to streams for different zoom levels
byte data[VARARRAY_SIZE]; ///< data, all zoomlevels
byte data[]; ///< data, all zoomlevels
};
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);

View File

@@ -20,17 +20,9 @@
*/
#ifdef NO_DEBUG_MESSAGES
#if defined(__GNUC__) && (__GNUC__ < 3)
#define DEBUG(name, level, args...) { }
#else
#define DEBUG(name, level, ...) { }
#endif
#define DEBUG(name, level, ...) { }
#else /* NO_DEBUG_MESSAGES */
#if defined(__GNUC__) && (__GNUC__ < 3)
#define DEBUG(name, level, args...) if ((level == 0) || ( _debug_ ## name ## _level >= level)) debug(#name, args)
#else
#define DEBUG(name, level, ...) if (level == 0 || _debug_ ## name ## _level >= level) debug(#name, __VA_ARGS__)
#endif
#define DEBUG(name, level, ...) if (level == 0 || _debug_ ## name ## _level >= level) debug(#name, __VA_ARGS__)
extern int _debug_ai_level;
extern int _debug_driver_level;

View File

@@ -591,7 +591,7 @@ void GamelogGRFAddList(const GRFConfig *newg)
/** List of GRFs using array of pointers instead of linked list */
struct GRFList {
uint n;
const GRFConfig *grf[VARARRAY_SIZE];
const GRFConfig *grf[];
};
/** Generates GRFList

View File

@@ -80,7 +80,7 @@ public:
public:
GRFText *next;
byte langid;
char text[VARARRAY_SIZE];
char text[];
};

View File

@@ -5,14 +5,6 @@
#ifndef SQUIRREL_CLASS_HPP
#define SQUIRREL_CLASS_HPP
#if (__GNUC__ == 2)
/* GCC 2.95 doesn't like to have SQConvert::DefSQStaticCallback inside a
* template (it gives an internal error 373). Above that, it doesn't listen
* to 'using namespace' inside a function of a template. So for GCC 2.95 we
* do it in the global space to avoid compiler errors. */
using namespace SQConvert;
#endif /* __GNUC__ == 2 */
/**
* The template to define classes in Squirrel. It takes care of the creation
* and calling of such classes, to make the AI Layer cleaner while having a

View File

@@ -7,7 +7,7 @@
struct Array {
int32 size;
int32 array[VARARRAY_SIZE];
int32 array[];
};
#endif /* SQUIRREL_HELPER_TYPE_HPP */

View File

@@ -19,8 +19,7 @@ enum {
SIG_GLOB_UPDATE = 64, ///< how many items need to be in _globset to force update
};
/* need to typecast to compile with MorphOS */
assert_compile((int)SIG_GLOB_UPDATE <= (int)SIG_GLOB_SIZE);
assert_compile(SIG_GLOB_UPDATE <= SIG_GLOB_SIZE);
/** incidating trackbits with given enterdir */
static const TrackBitsByte _enterdir_to_trackbits[DIAGDIR_END] = {

View File

@@ -67,7 +67,7 @@ static SpriteCache *AllocateSpriteCache(uint index)
struct MemBlock {
size_t size;
byte data[VARARRAY_SIZE];
byte data[];
};
static uint _sprite_lru_counter;

View File

@@ -12,7 +12,7 @@ struct Sprite {
uint16 width;
int16 x_offs;
int16 y_offs;
byte data[VARARRAY_SIZE];
byte data[];
};
extern uint _sprite_cache_size;

View File

@@ -116,9 +116,6 @@
#define printf pspDebugScreenPrintf
#endif /* PSP */
/* by default we use [] var arrays */
#define VARARRAY_SIZE
/* Stuff for GCC */
#if defined(__GNUC__)
#define NORETURN __attribute__ ((noreturn))
@@ -129,11 +126,6 @@
/* Warn about functions using 'printf' format syntax. First argument determines which parameter
* is the format string, second argument is start of values passed to printf. */
#define WARN_FORMAT(string, args) __attribute__ ((format (printf, string, args)))
#if (__GNUC__ == 2)
#undef VARARRAY_SIZE
#define VARARRAY_SIZE 0
#endif
#endif /* __GNUC__ */
#if defined(__WATCOMC__)

View File

@@ -45,7 +45,7 @@ static char *GetSpecialNameString(char *buff, int ind, int64 *argv, const char *
static char *FormatString(char *buff, const char *str, int64 *argv, uint casei, const char *last);
struct LanguagePack : public LanguagePackHeader {
char data[VARARRAY_SIZE]; // list of strings
char data[]; // list of strings
};
static char **_langpack_offs;

View File

@@ -1450,7 +1450,7 @@ enum SpriteMasks {
assert_compile( (1 << TRANSPARENT_BIT & SPRITE_MASK) == 0 );
assert_compile( (1 << RECOLOUR_BIT & SPRITE_MASK) == 0 );
assert_compile( !(TRANSPARENT_BIT == RECOLOUR_BIT) );
assert_compile( TRANSPARENT_BIT != RECOLOUR_BIT );
assert_compile( (1 << TRANSPARENT_BIT & PALETTE_MASK) == 0);
assert_compile( (1 << RECOLOUR_BIT & PALETTE_MASK) == 0 );