[Bug c/86377] extern int errno; is treated as buggy function declaration [-Werror=strict-prototypes]

2018-07-02 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86377 --- Comment #9 from Jonathan Wakely --- (In reply to U.Mutlu from comment #8) > It is possible to fix all the warnings and then use -Werror. But only today. Tomorrow's compilers will have different warnings. And yesterday's compilers too. I

[Bug c/86377] extern int errno; is treated as buggy function declaration [-Werror=strict-prototypes]

2018-07-02 Thread um at mutluit dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86377 --- Comment #8 from U.Mutlu --- If one activates -Werror then it won't build as it then treats the warnings as error. And there are many warnings currently suppressed. That means -Werror is deactivated by default, and IMO never activated by any

[Bug c/86377] extern int errno; is treated as buggy function declaration [-Werror=strict-prototypes]

2018-07-02 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86377 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org ---

[Bug c/86377] extern int errno; is treated as buggy function declaration [-Werror=strict-prototypes]

2018-07-02 Thread um at mutluit dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86377 --- Comment #6 from U.Mutlu --- The configure scripts in the subdirs/libs (like libiberty) do compile some test codes to populate the config.h of the subdir. And there the difference happens if -Wuninitialized is treated as error, ie. if user

[Bug c/86377] extern int errno; is treated as buggy function declaration [-Werror=strict-prototypes]

2018-07-02 Thread um at mutluit dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86377 --- Comment #5 from U.Mutlu --- The configure scripts in the subdirs/libs (like libiberty) do compile some test codes to populate the config.h of the subdir. And there the difference happens if -Wuninitialized is treated as error, ie. if user

[Bug c/86377] extern int errno; is treated as buggy function declaration [-Werror=strict-prototypes]

2018-07-02 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86377 --- Comment #4 from Andrew Pinski --- NEED_DECLARATION_ERRNO should not be defined for most targets/hosts. You need to figure out why it is being defined here. Look at config.log to figure that out.

[Bug c/86377] extern int errno; is treated as buggy function declaration [-Werror=strict-prototypes]

2018-07-02 Thread um at mutluit dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86377 --- Comment #3 from U.Mutlu --- As said in the Remarks, the bug originally was triggered in this file in the trunk: ../gcc_trunk/libiberty/pex-common.c:28 #include #ifdef NEED_DECLARATION_ERRNO extern int errno; #endif

[Bug c/86377] extern int errno; is treated as buggy function declaration [-Werror=strict-prototypes]

2018-07-02 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86377 --- Comment #2 from Jonathan Wakely --- In fact is required to define it as a macro in C, and a footnote says: "The macro errno need not be the identifier of an object. It might expand to a modifiable lvalue resulting from a function call (for

[Bug c/86377] extern int errno; is treated as buggy function declaration [-Werror=strict-prototypes]

2018-07-02 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86377 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---