This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/13080] clock() is unusable on 32-bit targets due to wrong type for clock_t


http://sourceware.org/bugzilla/show_bug.cgi?id=13080

--- Comment #2 from Rich Felker <bugdal at aerifal dot cx> 2011-08-30 18:07:34 UTC ---
I haven't worked out an example yet, but I suspect you can construct a case
where gcc will optimize out a necessary comparison due to the fact that signed
arithmetic cannot overflow.  I agree it's unfortunate that fixing this bug
would break C++ functions using clock_t arguments, but this is a genuine bug
and it will probably eventually have visible effects (possibly deadlock or
random hour-long sleeps) as optimizers get more and more aggressive. And of
course, code using clock_t will *always* break when compiling with trapping
overflow mode.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]