https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67279
Marek Polacek changed:
What|Removed |Added
CC||mpolacek at gcc dot gnu.org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67279
--- Comment #2 from Vittorio Zecca ---
UB = undefined behaviour?
Why then it is only signaled if "static" attribute is requested?
This is accepted:"int dec_1 = 1 << 31;"
Isn't UB as well if it is not static?
I believe gcc should deliver a warning
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67279
--- Comment #3 from Vittorio Zecca ---
The following code has UB at lines 4 and 5 but compiles with
-fsanitize=undefined
int main()
{
int test[1],t;
t=test[1];
return test[1];
}
Its execution it delivers four runtime errors from the sanitizer an
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67279
Manuel López-Ibáñez changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67279
--- Comment #5 from Manuel López-Ibáñez ---
(In reply to Manuel López-Ibáñez from comment #4)
> A possible solution could be to give a warning enabled by default (about 1
> << 31 being undefined) and to NOT sanitize expressions that are required
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67279
--- Comment #6 from Vittorio Zecca ---
On my side it has to do with the C standard.
Compilation with -ansi or -std=c90 is successful.
Compilation with -std=c99 fails.
Compiling with g++ is OK.
The behaviour I would like to see is a warning at co
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67279
--- Comment #7 from Marek Polacek ---
Yeah, I think I'll change this.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67279
Marek Polacek changed:
What|Removed |Added
Status|NEW |ASSIGNED
Assignee|unassigned a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67279
--- Comment #8 from Marek Polacek ---
Author: mpolacek
Date: Fri Sep 4 12:37:39 2015
New Revision: 227491
URL: https://gcc.gnu.org/viewcvs?rev=227491&root=gcc&view=rev
Log:
PR sanitizer/67279
* c-typeck.c (build_binary_op): Don'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67279
Marek Polacek changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
10 matches
Mail list logo