public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [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
@ 2021-10-28 3:36 konstantinua00 at gmail dot com
2021-10-28 7:51 ` [Bug c++/102978] " redi at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: konstantinua00 at gmail dot com @ 2021-10-28 3:36 UTC (permalink / raw)
To: gcc-bugs
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 <any_std_header>
```
or
```
struct bar
#include <any_std_header>
```
as stated, give many useless errors.
example with <bitset>: https://godbolt.org/z/KbrrszEWr
less intimidating example with <cstddef>: 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?
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/102978] 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
2021-10-28 3:36 [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 konstantinua00 at gmail dot com
@ 2021-10-28 7:51 ` redi at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2021-10-28 7:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102978
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
N.B. Component 'debug' is for debug info used by debuggers, not for compiler
error messages.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-28 7:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28 3:36 [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 konstantinua00 at gmail dot com
2021-10-28 7:51 ` [Bug c++/102978] " redi at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).