Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the workaround for the gcc bug 51253? #451

Open
Chandlerooo opened this issue Aug 10, 2022 · 1 comment
Open

Remove the workaround for the gcc bug 51253? #451

Chandlerooo opened this issue Aug 10, 2022 · 1 comment

Comments

@Chandlerooo
Copy link

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?

@rbock
Copy link
Owner

rbock commented Aug 10, 2022

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

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

No branches or pull requests

2 participants