diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-02-05 16:01:42 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-02-05 16:01:42 +0200 |
commit | 511dcf67322ad87fb32f97d1cf7725c129e83898 (patch) | |
tree | cfcbf8705fc208d101b8adbd270a425e7466d518 /odb/plugin.cxx | |
parent | d1b34452618d36eb486ff18b16f5d94acc6eeb07 (diff) |
Initial work to make ODB compatible with GCC 6
Diffstat (limited to 'odb/plugin.cxx')
-rw-r--r-- | odb/plugin.cxx | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/odb/plugin.cxx b/odb/plugin.cxx index fbbfe46..bc98f3e 100644 --- a/odb/plugin.cxx +++ b/odb/plugin.cxx @@ -45,14 +45,28 @@ path file_; // File being compiled. paths inputs_; // List of input files in at-once mode or just file_. bool (*cpp_error_prev) ( - cpp_reader*, int, int, location_t, unsigned int, const char*, va_list*); + cpp_reader*, + int, + int, +#if BUILDING_GCC_MAJOR >= 6 + rich_location*, +#else + location_t, + unsigned int, +#endif + const char*, + va_list*); static bool cpp_error_filter (cpp_reader* r, int level, int reason, +#if BUILDING_GCC_MAJOR >= 6 + rich_location* l, +#else location_t l, unsigned int column_override, +#endif const char* msg, va_list* ap) { @@ -66,7 +80,18 @@ cpp_error_filter (cpp_reader* r, if (strstr (msg, "#pragma once") != 0) return true; - return cpp_error_prev (r, level, reason, l, column_override, msg, ap); + return cpp_error_prev ( + r, + level, + reason, +#if BUILDING_GCC_MAJOR >= 6 + l, +#else + l, + column_override, +#endif + msg, + ap); } // A prefix of the _cpp_file struct. This struct is not part of the |