In various multi threaded C and C++ projects I've seen the -pthread
flag applied to both the compiling and linking stage while others don't use it at all and just pass -lpthread
to the linking stage.
Is there any danger not compiling and linking with the -pthread
flag - i.e. what does -pthread
actually do ? I'm primarily interested in Linux platforms.
errno
and preprocessing in general. I'm not sure how relevant the article hpl.hp.com/techreports/2004/HPL-2004-209.pdf is in practice for gcc optimizations, but I sure was impressed by the depth of the review there. – Implicative