Opened 8 years ago

Closed 8 years ago

#4073 closed defect (duplicate)

[PATCH] Fix C++14 Compatibility needed for GCC6

Reported by: susnux Owned by:
Priority: Must Have Milestone:
Component: Build & Packages Keywords: gcc6, compiling
Cc: Patch:

Description

GCC6 defaults to C++14, so compiling with it will produce some errors. (I use openSUSE Tumbleweed with GCC6).

The fix is quite simple and a patch is attached, the problem with 0ad is that there are functions with pointer as return value which return "false", that worked for c++ <= 2003 because false evaluates to 0 which is a valid pointer. But for C++ >= 2011 false will not evaluate to 0.

Attachments (1)

fix-c++14-compat.patch (1.1 KB ) - added by susnux 8 years ago.
Patch: Fix compatibility with c++14 needed for gcc6

Download all attachments as: .zip

Change History (3)

by susnux, 8 years ago

Attachment: fix-c++14-compat.patch added

Patch: Fix compatibility with c++14 needed for gcc6

comment:1 by susnux, 8 years ago

Forgot to mention: I use Alpha 20 of 0AD.

comment:2 by elexis, 8 years ago

Milestone: Backlog
Resolution: duplicate
Status: newclosed

Thanks for your notification and the patch, that is always welcome! The bug you mentioned was reported and fixed in #3967 (unfortunately after the last release).

Note: See TracTickets for help on using tickets.