This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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 tree-optimization/82429] strcpy to stpcpy transformation disabled in strict mode


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82429

--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
Strictly, that a program declares stpcpy should be irrelevant if the 
declaration is outside system headers, because it could declare and define 
it for some other purpose (even if the prototype matches).

If declared *in system headers*, stpcpy can be assumed to have POSIX 
semantics; likewise if __builtin_stpcpy is called by the program (because 
calling __builtin_stpcpy implies it's OK to generate a call to stpcpy for 
such a call, so stpcpy can be assumed to have POSIX semantics).

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