Y
Hacker News
new
|
ask
|
show
|
jobs
by
Marat_Dukhan
4442 days ago
I checked 3 compilers: icc 14, gcc 4.8, and clang 3.3. Clang is the only one which optimized the memset away.
2 comments
lawnchair_larry
4442 days ago
Did you enable optimization? I know first hand that GCC will optimize something similar out in many cases.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8537
link
Marat_Dukhan
4442 days ago
Yes, I compiled with -O3.
link
timtadh
4442 days ago
Not a windows user so I can't check but given that it is the kernel driver the compiler we would be concerned about is the MS visual c++ compiler.
link
Marat_Dukhan
4442 days ago
Visual C++ 2013 doesn't remove memset either.
link
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8537