[issue27659] Prohibit implicit C function declarations

2017-03-31 Thread Donald Stufft

Changes by Donald Stufft :


--
pull_requests: +946

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27659] Prohibit implicit C function declarations

2017-02-06 Thread Roundup Robot

Roundup Robot added the comment:


New changeset 9a26d20d2baa27407501b13435d733dcc26f3d53 by Victor Stinner in 
branch 'master':
Prohibit implicit C function declarations
https://github.com/python/cpython/commit/9a26d20d2baa27407501b13435d733dcc26f3d53


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27659] Prohibit implicit C function declarations

2017-02-06 Thread STINNER Victor

STINNER Victor added the comment:

Oh by the way, if someone sees a build error because of a missing function 
declaration, please report a new issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27659] Prohibit implicit C function declarations

2017-02-06 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

> If yes, can we close the issue?

Yes and thanks! As a side note, on Android it prevents broken 
grp.cpython-37m.so, too.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27659] Prohibit implicit C function declarations

2017-02-06 Thread STINNER Victor

STINNER Victor added the comment:

Martin Panter: "If there is an obscure platform where we don’t include the 
right header file for a function, changing the warning into an error would 
cause the build to fail."

In my experience, calling a function which was not declared is very likely to 
cause a bug, or a crash in the worst case. For example, on 64-bit, if the 
return type is a pointer, the C compiler uses the int type by default, whereas 
a pointer is 32-bit, not 64-bit, and so it will immediately crash.

Martin: "If we do make it an error, it should only be so for 3.7."

Ok. I pushed the patch to Python 3.6.


@Chi Hsuan Yen: Thanks for the patch! Is this change enough to fix the crypt 
build issue? If yes, can we close the issue?

It is likely that the cause causes compilation errors on some platforms where 
we call non-existent functions or call functions with a missing header. IMHO 
it's a good thing to get a build error rather than a crash at runtime.

A concrete issue is that the compilation of the curses module will probably 
fails now on Solaris: issue #13552, whereas before the build only emitted 
warnings. The curses module is broken for years on Solaris, and it seems like 
nobody is able to fix it, so it's not a big deal.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27659] Prohibit implicit C function declarations

2017-02-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ca2f024ce7cb by Victor Stinner in branch 'default':
Prohibit implicit C function declarations
https://hg.python.org/cpython/rev/ca2f024ce7cb

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27659] Prohibit implicit C function declarations

2017-02-02 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Hello, any updates here? I hope this merged soon so that potential issues on 
obscure platforms can be fixed as soon as possible.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27659] Prohibit implicit C function declarations

2017-01-16 Thread Martin Panter

Martin Panter added the comment:

I would say it is more important to fit in with the surrounding style than 
mindlessly follow PEP 7. IMO the indentation in the configure script is a mess, 
but if we fix it up, it should probably be done separately to adding this extra 
flag.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27659] Prohibit implicit C function declarations

2017-01-16 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Thanks for the comment and sorry for the mistake. Here's another updated patch.

In PEP7:

> Use 4-space indents and no tabs at all.

Does that apply to configuration files, too?

--
Added file: 
http://bugs.python.org/file46302/prohibit-implicit-function-declarations.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27659] Prohibit implicit C function declarations

2016-12-25 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

> Would it be possible to not add this option for third party extensions?

Good suggestion. Just use $CFLAGS_NODIST instead of $BASECFLAGS.

--
Added file: 
http://bugs.python.org/file46036/prohibit-implicit-function-declarations.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27659] Prohibit implicit C function declarations

2016-12-25 Thread STINNER Victor

STINNER Victor added the comment:

Would it be possible to not add this option for third party extensions?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27659] Prohibit implicit C function declarations

2016-12-25 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

(Re-use the existing issue)

Here's a patch that tries to add -Werror=implicit-function-declaration to 
$BASECFLAGS.

This is useful for cross-compiling. When a function is missing, the error jumps 
out during the build time rather than runtime.

Tested configurations:
* Arch Linux x86_64 native build
* macOS Sierra native build
* Android ARM, API 21 cross build

I'd like to hear some ideas from macOS experts as in my memory macOS's build 
system is fragile than that on Linux.

--
components: +Build
nosy: +ned.deily, ronaldoussoren
title: Check for the existence of crypt() -> Prohibit implicit C function 
declarations
type: compile error -> enhancement
Added file: 
http://bugs.python.org/file46033/prohibit-implicit-function-declarations.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com