public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98508] New: Sanitizer disable -Wall and -Wextra
@ 2021-01-04  8:31 awdawdawdawq123123 at gmx dot de
  2021-01-04  8:51 ` [Bug c++/98508] " jakub at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: awdawdawdawq123123 at gmx dot de @ 2021-01-04  8:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98508

            Bug ID: 98508
           Summary: Sanitizer disable -Wall and -Wextra
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: awdawdawdawq123123 at gmx dot de
  Target Milestone: ---

Created attachment 49871
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49871&action=edit
source file

1.cpp:
```
struct S
{
    int a;
};

int main()
{
    S s = S(s);
}
```

Compiling this by calling 

g++ -Wall -Wextra  1.cpp

yields the warning:
```
1.cpp: In function ‘int main()’:
1.cpp:8:7: warning: ‘s’ is used uninitialized in this function
[-Wuninitialized]
    8 |     S s = S(s);
      |       ^
```
as expected. But when additionally using Sanitizers the call

g++ -Wall -Wextra  -fsanitize=address,undefined 1.cpp

yields no warnings. 
Attached is the source file.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-04-16 22:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-04  8:31 [Bug c++/98508] New: Sanitizer disable -Wall and -Wextra awdawdawdawq123123 at gmx dot de
2021-01-04  8:51 ` [Bug c++/98508] " jakub at gcc dot gnu.org
2021-01-04  8:59 ` awdawdawdawq123123 at gmx dot de
2021-01-05 18:46 ` [Bug middle-end/98508] " msebor at gcc dot gnu.org
2021-01-05 19:00 ` jakub at gcc dot gnu.org
2021-01-05 20:02 ` msebor at gcc dot gnu.org
2021-04-16 22:32 ` msebor 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).