Thomas Rast wrote: > Jim Meyering wrote: > > Thomas Rast wrote: > > > [GCC moves access to a file-static variable across pthread_mutex_lock()] > > > > Thanks for the investigation. > > Actually, isn't gcc -O2's code-motion justified? > > While we *know* that those globals may be modified asynchronously, > > builtin/grep.c forgot to tell gcc about that. > > I'm somewhat unwilling to believe that: > > * "volatile" enforces three unrelated things, see e.g. [1]. Argh, forgot my reference: [1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2016.html section "Existing portable uses" -- Thomas Rast trast@{inf,student}.ethz.ch -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html