[Bug c/61029] New: Bogus conversion warnings are issued on a sign change "a = -a;" operation

2014-05-01 Thread dchichkov at gmail dot com
Severity: trivial Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dchichkov at gmail dot com The following code, if compiled with '-Wconversion' with GCC 4.8.1: // gcc conv.c -Wconversion int main() { short int a = 1;

[Bug c/61029] Bogus conversion warnings are issued on a sign change "a = -a;" operation

2014-05-01 Thread dchichkov at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61029 --- Comment #2 from Dmitry Chichkov --- Ah. Yes. You are correct. It doesn't look like it is being truncated to 0, as the following code: #include #include int main() { short int a = SHRT_MIN; printf("%d\n", a); a = -a; p

[Bug libstdc++/44653] New: A uniform_real random distribution produces invalid floating-point random numbers

2010-06-24 Thread dchichkov at gmail dot com
gnedTo: unassigned at gcc dot gnu dot org ReportedBy: dchichkov at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44653

[Bug libstdc++/44653] A uniform_real random distribution produces invalid floating-point random numbers

2010-06-24 Thread dchichkov at gmail dot com
--- Comment #1 from dchichkov at gmail dot com 2010-06-24 09:53 --- Update. Following code produces the correct value: #include #include #include int main() { typedef std::mt19937 eng_t; typedef std::uniform_real dist_t; typedef std::variate_generator gen_t; eng_t eng; dist_t