
On Thu, 10 May 2012, Stephan Kulow wrote:
Am 09.05.2012 23:19, schrieb Cristian Rodríguez:
when -ansi is used and (defined(_GNU_SOURCE) || (_XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L)) is false, there is no stpcpy prototype and hence no optimization.
Thoughts ?
My usual question would apply: Can you measure the difference? If not, I wouldn't want to waste my energy discussing this.
-ansi is a _very_ popular flag - e.g. all of KDE (3 and 4) uses it.
Using this flag (or what it aliases to - -std=c++98/c90 as opposed to the defaults which are gnu++98/gnu90) makes sense to avoid GCC features creep into a codebase and thus make sure the source will also build using compilers that are not GCC (or implement all of its extensions). Using the flag to produce binaries for a GNU/Linux system makes less sense though. I'm not sure what we should do here, but if we do something we need to handle -std=c90, -std=c99, etc. the same way (thus, recommend the gnu variants). Richard. -- Richard Guenther <rguenther@suse.de> SUSE / SUSE Labs SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer