Skip to content

Conversation

@fgiancane8
Copy link

Several issues and errors are patched with this PR.

In particular, old compilers quirks were exploited to produce executables and some conversion errors still were there.

Now it is possible to compile (not without warnings...) the executables with clang (6.0.0) and gcc (8.1.1).

fgiancane8 added 10 commits May 30, 2018 16:43
GCC8 refuses to compile this file because of implicit truncation between
integer variables and constants. Extend the size of the in-memory table to fix the issue.

Signed-off-by: Francesco Giancane <francescogiancane8@gmail.com>
GCC8 refuses to compile this file because of (wrong) implicit
conversion between boolean and pointers.
This was based on the (now wrong) implicit assumption that false
would convert to NULL.

Signed-off-by: Francesco Giancane <francescogiancane8@gmail.com>
Some files used for AI for some kind of actors use a static variable
called 'move'.

Using recently enough compilers, an ambiguity between the aforementioned
names would apply.

Fix the issue by renaming the global variable.

Signed-off-by: Francesco Giancane <francescogiancane8@gmail.com>
The source file g_weapon.cpp contains a variable called 'forward'
which may be evaluated as a reference for std::forward function.

Renaming the global variable will fix the ambiguity on more recent compilers.

Signed-off-by: Francesco Giancane <francescogiancane8@gmail.com>
This file contains an implementation of some math functions
that can be now found on modern compilers and environment.

This can be safely emptied (and then removed when removed from CMakeLists.txt).

Signed-off-by: Francesco Giancane <francescogiancane8@gmail.com>
Adding a static_cast<> to ensure that integral values are correctly promoted to vec3_t.

Signed-off-by: Francesco Giancane <francescogiancane8@gmail.com>
field was wrongly typed as int, but in reality it should store a size_t.

This fixes compilation issues on platforms where sizeof(int) != sizeof(size_t).

Signed-off-by: Francesco Giancane <francescogiancane8@gmail.com>
Preprocessed string concatenation was abused in this context.

More recent compilers would just reject that syntax and refuse to compile.
Rewrite the code so that same output is produced but no error is generated.

Signed-off-by: Francesco Giancane <francescogiancane8@gmail.com>
On some platforms, where sizeof(int) != sizeof(size_t), the struct
could not accomodate all the data.
Fix the issue by retyping the flags correctly.

Signed-off-by: Francesco Giancane <francescogiancane8@gmail.com>
With the last modification in the structure, the building failure was fixed just for x86_64 machines.
Promoting long int to long long (int) fixes the failure for both x86 and x86_64 machines.

Tested with Clang and GCC 8.

Signed-off-by: Francesco Giancane <francescogiancane8@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant