Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-29 Thread Barry Warsaw
On Jun 28, 2010, at 05:28 PM, M.-A. Lemburg wrote: How many Python users will compile Python in debug mode ? How many Python users compile Python at all? :) The point is that the default build of Python should use the correct production settings for the C compiler out of the box and that's what

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-29 Thread Barry Warsaw
On Jun 28, 2010, at 06:03 PM, M.-A. Lemburg wrote: OPT already uses -O0 if --with-pydebug is used and the compiler supports -g. Since OPT gets added after CFLAGS, the override already happens... So nobody's proposing to drop that? Good! Ignore my last message then. :) -Barry signature.asc

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-29 Thread Steve Holden
Barry Warsaw wrote: On Jun 28, 2010, at 05:28 PM, M.-A. Lemburg wrote: How many Python users will compile Python in debug mode ? How many Python users compile Python at all? :) The point is that the default build of Python should use the correct production settings for the C compiler

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-29 Thread Stephen J. Turnbull
Steve Holden writes: I agree - trying to step through -O2 optimized code isn't going to help debug your code, it's going to help you debug the optimizer. That's a very rare use case. Not really. I don't have a lot of practice in debugging at that level, so take it with a grain of salt,

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-28 Thread M.-A. Lemburg
Brett Cannon wrote: On Sun, Jun 27, 2010 at 13:37, Jeffrey Yasskin jyass...@gmail.com wrote: On Sun, Jun 27, 2010 at 1:04 PM, Mark Dickinson dicki...@gmail.com wrote: On Sun, Jun 27, 2010 at 6:46 AM, Jeffrey Yasskin jyass...@gmail.com wrote: AC_PROG_CC is the macro that sets CFLAGS to -g -O2

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-28 Thread Mark Dickinson
On Mon, Jun 28, 2010 at 12:38 PM, M.-A. Lemburg m...@egenix.com wrote: On Sun, Jun 27, 2010 at 13:37, Jeffrey Yasskin jyass...@gmail.com wrote: On Sun, Jun 27, 2010 at 1:04 PM, Mark Dickinson dicki...@gmail.com wrote: I'm not sure I understand the importance of allowing AC_PROG_CC to set

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-28 Thread M.-A. Lemburg
Mark Dickinson wrote: On Mon, Jun 28, 2010 at 12:38 PM, M.-A. Lemburg m...@egenix.com wrote: On Sun, Jun 27, 2010 at 13:37, Jeffrey Yasskin jyass...@gmail.com wrote: On Sun, Jun 27, 2010 at 1:04 PM, Mark Dickinson dicki...@gmail.com wrote: I'm not sure I understand the importance of allowing

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-28 Thread Mark Dickinson
On Mon, Jun 28, 2010 at 3:04 PM, M.-A. Lemburg m...@egenix.com wrote: Why do you think that the default -O2 is unwanted Because it can cause debug builds of Python to be built with optimization enabled, as we've already seen at least twice. and how do you know whether the compiler accepts -g

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-28 Thread M.-A. Lemburg
Mark Dickinson wrote: On Mon, Jun 28, 2010 at 3:04 PM, M.-A. Lemburg m...@egenix.com wrote: Why do you think that the default -O2 is unwanted Because it can cause debug builds of Python to be built with optimization enabled, as we've already seen at least twice. Then let me put it this way:

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-28 Thread M.-A. Lemburg
M.-A. Lemburg wrote: Mark Dickinson wrote: On Mon, Jun 28, 2010 at 3:04 PM, M.-A. Lemburg m...@egenix.com wrote: Why do you think that the default -O2 is unwanted Because it can cause debug builds of Python to be built with optimization enabled, as we've already seen at least twice. Then

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-28 Thread Mark Dickinson
On Mon, Jun 28, 2010 at 4:28 PM, M.-A. Lemburg m...@egenix.com wrote: Mark Dickinson wrote: On Mon, Jun 28, 2010 at 3:04 PM, M.-A. Lemburg m...@egenix.com wrote: Why do you think that the default -O2 is unwanted Because it can cause debug builds of Python to be built with optimization

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-28 Thread M.-A. Lemburg
Mark Dickinson wrote: On Mon, Jun 28, 2010 at 4:28 PM, M.-A. Lemburg m...@egenix.com wrote: Mark Dickinson wrote: On Mon, Jun 28, 2010 at 3:04 PM, M.-A. Lemburg m...@egenix.com wrote: Why do you think that the default -O2 is unwanted Because it can cause debug builds of Python to be built

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-27 Thread Roumen Petrov
Brett Cannon wrote: On Sat, Jun 26, 2010 at 16:37, M.-A. Lemburgm...@egenix.com wrote: Brett Cannon wrote: On Wed, Jun 23, 2010 at 14:53, Brett Cannonbr...@python.org wrote: [SKIP] Since no one objected I swapped the order in r82259. In case anyone else uses clang to compile Python, this

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-27 Thread Mark Dickinson
On Sun, Jun 27, 2010 at 12:37 AM, M.-A. Lemburg m...@egenix.com wrote: Brett Cannon wrote: On Wed, Jun 23, 2010 at 14:53, Brett Cannon br...@python.org wrote: I finally realized why clang has not been silencing its warnings about unused return values: I have -Wno-unused-value set in CFLAGS

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-27 Thread Mark Dickinson
On Sun, Jun 27, 2010 at 6:46 AM, Jeffrey Yasskin jyass...@gmail.com wrote: AC_PROG_CC is the macro that sets CFLAGS to -g -O2 on gcc-based systems (http://www.gnu.org/software/hello/manual/autoconf/C-Compiler.html#index-AC_005fPROG_005fCC-842). If Python's configure.in sets an otherwise-empty

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-27 Thread Jeffrey Yasskin
On Sun, Jun 27, 2010 at 1:04 PM, Mark Dickinson dicki...@gmail.com wrote: On Sun, Jun 27, 2010 at 6:46 AM, Jeffrey Yasskin jyass...@gmail.com wrote: AC_PROG_CC is the macro that sets CFLAGS to -g -O2 on gcc-based systems

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-27 Thread Brett Cannon
On Sun, Jun 27, 2010 at 13:37, Jeffrey Yasskin jyass...@gmail.com wrote: On Sun, Jun 27, 2010 at 1:04 PM, Mark Dickinson dicki...@gmail.com wrote: On Sun, Jun 27, 2010 at 6:46 AM, Jeffrey Yasskin jyass...@gmail.com wrote: AC_PROG_CC is the macro that sets CFLAGS to -g -O2 on gcc-based systems

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-27 Thread Mark Dickinson
On Sun, Jun 27, 2010 at 9:37 PM, Jeffrey Yasskin jyass...@gmail.com wrote: On Sun, Jun 27, 2010 at 1:04 PM, Mark Dickinson dicki...@gmail.com wrote: I think saving and restoring CFLAGS across AC_PROG_CC was attempted in http://bugs.python.org/issue8211 . It turned out that it broke OS X

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-26 Thread Roumen Petrov
Brett Cannon wrote: I finally realized why clang has not been silencing its warnings about unused return values: I have -Wno-unused-value set in CFLAGS which comes before OPT (which defines -Wall) as set in PY_CFLAGS in Makefile.pre.in. I could obviously set OPT in my environment, but that

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-26 Thread Brett Cannon
On Wed, Jun 23, 2010 at 14:53, Brett Cannon br...@python.org wrote: I finally realized why clang has not been silencing its warnings about unused return values: I have -Wno-unused-value set in CFLAGS which comes before OPT (which defines -Wall) as set in PY_CFLAGS in Makefile.pre.in. I could

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-26 Thread M.-A. Lemburg
Brett Cannon wrote: On Wed, Jun 23, 2010 at 14:53, Brett Cannon br...@python.org wrote: I finally realized why clang has not been silencing its warnings about unused return values: I have -Wno-unused-value set in CFLAGS which comes before OPT (which defines -Wall) as set in PY_CFLAGS in

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-26 Thread Brett Cannon
On Sat, Jun 26, 2010 at 16:37, M.-A. Lemburg m...@egenix.com wrote: Brett Cannon wrote: On Wed, Jun 23, 2010 at 14:53, Brett Cannon br...@python.org wrote: I finally realized why clang has not been silencing its warnings about unused return values: I have -Wno-unused-value set in CFLAGS which

Re: [Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-26 Thread Jeffrey Yasskin
On Sat, Jun 26, 2010 at 4:37 PM, M.-A. Lemburg m...@egenix.com wrote: Brett Cannon wrote: On Wed, Jun 23, 2010 at 14:53, Brett Cannon br...@python.org wrote: I finally realized why clang has not been silencing its warnings about unused return values: I have -Wno-unused-value set in CFLAGS