[Bug debug/102979] New: GCC gives wrong error for struct definitions without semicolon, despite G++ doing so
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102979 Bug ID: 102979 Summary: GCC gives wrong error for struct definitions without semicolon, despite G++ doing so Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: konstantinua00 at gmail dot com Target Milestone: --- ``` struct test{int i;} ``` https://godbolt.org/z/GEz56T7bT Current error: "error: expected identifier or '(' at end of input" (points to "test") G++ on the other hand gives reasonable: "error: expected ';' after struct definition" https://godbolt.org/z/YGqvY7bsa Is it possible to get G++'s error in GCC too?
[Bug debug/102978] New: Function/Struct declaration with absent semicolon that is put before including standard header results in wall of errors with no indication of the actual problem
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102978 Bug ID: 102978 Summary: Function/Struct declaration with absent semicolon that is put before including standard header results in wall of errors with no indication of the actual problem Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: konstantinua00 at gmail dot com Target Milestone: --- ``` void foo() #include ``` or ``` struct bar #include ``` as stated, give many useless errors. example with : https://godbolt.org/z/KbrrszEWr less intimidating example with : https://godbolt.org/z/hxnxzqTcW example with struct declaration: https://godbolt.org/z/nhTKc8cM9 happens in GCC with C std header too: https://godbolt.org/z/c6hMWexcW Such situation happens when there're 2 user headers: first with missing semicolon and second with new-in-TU std header. G++(but not GCC) already notices missing semicolon on struct definitions and GCC (but not G++) notices globals without one (due to typedef https://godbolt.org/z/44oYT1PKn), so maybe something can be done for declarations too?
[Bug libstdc++/101870] New: std::lerp is missing Arithmetic overloads
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101870 Bug ID: 101870 Summary: std::lerp is missing Arithmetic overloads Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: konstantinua00 at gmail dot com Target Milestone: --- According to C++20 standard paragraph 20.8.1.2, std::lerp is not an exception to expansion of acceptable parameters to integral and mixed floating point types. I.e. overload 4) from https://en.cppreference.com/w/cpp/numeric/lerp is missing. Example code (compile with -std=c++20): #include int main() { std::lerp(int{},int{},int{}); std::lerp(float{}, double{}, (long double)0); } https://godbolt.org/z/3PqP9M4GE Current behaviour: Does not compile with: "error: call of overloaded 'lerp(int, int, int)' is ambiguous" and "error: call of overloaded 'lerp(float, double, long double)' is ambiguous". Expected behaviour: Compilation with no issues.