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 would

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 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

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 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.

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 wrote: > Brett Cannon wrote: >> On Wed, Jun 23, 2010 at 14:53, 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 (w

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 wrote: > Brett Cannon wrote: >> On Wed, Jun 23, 2010 at 14:53, 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

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. Lemburg wrote: Brett Cannon wrote: On Wed, Jun 23, 2010 at 14:53, Brett Cannon wrote: [SKIP] Since no one objected I swapped the order in r82259. In case anyone else uses clang to compile Python, this means that -Wno-unused-value will

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 wrote: > Brett Cannon wrote: >> On Wed, Jun 23, 2010 at 14:53, 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

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 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 CFLAGS to -g b

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 wrote: > On Sun, Jun 27, 2010 at 6:46 AM, Jeffrey Yasskin 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). >> I

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 wrote: > On Sun, Jun 27, 2010 at 1:04 PM, Mark Dickinson wrote: >> On Sun, Jun 27, 2010 at 6:46 AM, Jeffrey Yasskin wrote: >>> AC_PROG_CC is the macro that sets CFLAGS to -g -O2 on gcc-based >>> systems >>> (http://www.gnu.org/software/hello/manual

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 wrote: > On Sun, Jun 27, 2010 at 1:04 PM, Mark Dickinson 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 >> universal builds. > > Thanks for the

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 wrote: >> On Sun, Jun 27, 2010 at 1:04 PM, Mark Dickinson wrote: >>> On Sun, Jun 27, 2010 at 6:46 AM, Jeffrey Yasskin wrote: AC_PROG_CC is the macro that sets CFLAGS to -g -O2 on gcc-based systems (http://www.gn

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 wrote: >> On Sun, Jun 27, 2010 at 13:37, Jeffrey Yasskin wrote: >>> On Sun, Jun 27, 2010 at 1:04 PM, Mark Dickinson wrote: I'm not sure I understand the importance of allowing AC_PROG_CC to set CFLAGS (if CFLAGS is undefined at the point

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 wrote: >>> On Sun, Jun 27, 2010 at 13:37, Jeffrey Yasskin wrote: On Sun, Jun 27, 2010 at 1:04 PM, Mark Dickinson wrote: > I'm not sure I understand the importance of allowing AC_PROG_CC to set > CFLAGS (if CFLAG

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 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 as option ?

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 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: How many

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 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 le

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 wrote: > Mark Dickinson wrote: >> On Mon, Jun 28, 2010 at 3:04 PM, M.-A. Lemburg 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

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 wrote: >> Mark Dickinson wrote: >>> On Mon, Jun 28, 2010 at 3:04 PM, M.-A. Lemburg wrote: Why do you think that the default -O2 is unwanted >>> >>> Because it can cause debug builds of Python to be built with >>> optimiza

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 w

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 c

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,