sqlpp11 icon indicating copy to clipboard operation
sqlpp11 copied to clipboard

Remove the workaround for the gcc bug 51253?

Open Chandlerooo opened this issue 2 years ago • 1 comments

I notice that interpret_tuple.h has a workaround: https://github.com/rbock/sqlpp11/blob/main/include/sqlpp11/interpret_tuple.h

    // Note: A braced-init-list does guarantee the order of evaluation according to 12.6.1 [class.explicit.init]
    // paragraph 2 and 8.5.4 [dcl.init.list] paragraph 4.
    // See for example: "http://en.cppreference.com/w/cpp/utility/integer_sequence"
    // See also: "http://stackoverflow.com/questions/6245735/pretty-print-stdtuple/6245777#6245777"
    // Beware of gcc-bug: "http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51253", otherwise an empty swallow struct could
    // be used
    using swallow = int[];
    (void)swallow{0,  // workaround against -Wpedantic GCC warning "zero-size array 'int [0]'"
                  (interpret_tuple_element(std::get<Is>(t), separator, context, useBraces, Is), 0)...};
    return context;

This compiler bug is marked as fixed: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51253 Shall the workaround be removed? Is the compiler bug actually fixed?

Chandlerooo avatar Aug 10 '22 02:08 Chandlerooo

Thanks for flagging this. Not urgent, I guess, but good to revisit at some point.

rbock avatar Aug 10 '22 05:08 rbock