Re: [perl #44389] Excessive warnings on Apple's gcc 3.3 wrt attributes

2007-08-04 Thread chromatic
On Friday 03 August 2007 21:35:36 chromatic wrote:

 r20454 doesn't help.  Of course, it looks like that's papering over the
 fact that the noreturn attribute expands (for me on x86 Linux, that is) to:

   #define PARROT_DOES_NOT_RETURN  /[EMAIL PROTECTED]@*/ 
 __attribute__noreturn__

 ... when it looks like it should be:

   #define PARROT_DOES_NOT_RETURN  /[EMAIL PROTECTED]@*/
 __attribute__((noreturn))

 So I'm not sure what went weird.

Ahh, this patch fixes things for me.  My gcc is also available as cc (and I'm 
using ccache), so checking that it matches the literal string 'gcc' doesn't 
work.  Explicitly checking that it has a GCC version number works better.

I don't promise that this is the *correct* solution, but it's a better one.

(Thank goodness and everyone who's coded and refactored the configuration 
system for the ability to run a configure step verbosely!)

-- c
=== config/auto/attributes.pm
==
--- config/auto/attributes.pm	(revision 5196)
+++ config/auto/attributes.pm	(local)
@@ -63,7 +63,7 @@
 my $cc = $conf-option_or_data( 'cc' );
 $verbose and print   cc: $cc$/;
 
-if ( $cc =~ /gcc/ ) {
+if ( $conf-data-get( 'gccversion' ) ) {
 cc_gen('config/auto/gcc/test_c.in');
 }
 elsif ( $cc eq 'cl' ) {


Re: [perl #44389] Excessive warnings on Apple's gcc 3.3 wrt attributes

2007-08-04 Thread James E Keenan

chromatic wrote:



Ahh, this patch fixes things for me.  My gcc is also available as cc (and I'm 
using ccache), so checking that it matches the literal string 'gcc' doesn't 
work.  Explicitly checking that it has a GCC version number works better.




Unfortunately, it did not improve things for me.

-rw-r--r--   1 jimk  jimk71898 Jul 15 10:30 15.07.2007.make.txt
-rw-r--r--   1 jimk  jimk73181 Jul 22 21:17 21.07.2007.make.txt
-rw-r--r--   1 jimk  jimk  7167507 Aug  3 21:43 03.08.2007.make.txt
-rw-r--r--   1 jimk  jimk  7167507 Aug  4 07:24 04.08.2007.make.txt

Note that I have to call Configure.pl in the following manner:

#!/bin/sh
CC=/usr/bin/gcc-3.3
CX=/usr/bin/g++-3.3
/usr/local/bin/perl Configure.pl --cc=$CC --cxx=$CX --link=$CX \
--ld=$CX --without-icu --without-gmp \
$@


[perl #44389] Excessive warnings on Apple's gcc 3.3 wrt attributes

2007-08-03 Thread via RT
# New Ticket Created by  Joshua Isom 
# Please include the string:  [perl #44389]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=44389 


The new attribute configure code seems to get a false positive with 
warn_unused_result on Apple's gcc 3.3.

Here's the configure output from the attribute checking code.

Detecting compiler attributes (-DHASATTRIBUTE_xxx)...
trying attribute 'HASATTRIBUTE_CONST'
   cc: cc
   cc -o test -Iinclude -fno-common -no-cpp-precomp  -pipe -pipe 
-fno-common -Wno-long-double  -DHASATTRIBUTE_CONST test.c
   exit code: 1
trying attribute 'HASATTRIBUTE_DEPRECATED'
   cc: cc
   cc -o test -Iinclude -fno-common -no-cpp-precomp  -pipe -pipe 
-fno-common -Wno-long-double  -DHASATTRIBUTE_DEPRECATED test.c
   exit code: 1
trying attribute 'HASATTRIBUTE_FORMAT'
   cc: cc
   cc -o test -Iinclude -fno-common -no-cpp-precomp  -pipe -pipe 
-fno-common -Wno-long-double  -DHASATTRIBUTE_FORMAT test.c
   exit code: 1
trying attribute 'HASATTRIBUTE_MALLOC'
   cc: cc
   cc -o test -Iinclude -fno-common -no-cpp-precomp  -pipe -pipe 
-fno-common -Wno-long-double  -DHASATTRIBUTE_MALLOC test.c
   exit code: 1
trying attribute 'HASATTRIBUTE_NONNULL'
   cc: cc
   cc -o test -Iinclude -fno-common -no-cpp-precomp  -pipe -pipe 
-fno-common -Wno-long-double  -DHASATTRIBUTE_NONNULL test.c
   exit code: 1
trying attribute 'HASATTRIBUTE_NORETURN'
   cc: cc
   cc -o test -Iinclude -fno-common -no-cpp-precomp  -pipe -pipe 
-fno-common -Wno-long-double  -DHASATTRIBUTE_NORETURN test.c
   exit code: 1
trying attribute 'HASATTRIBUTE_PURE'
   cc: cc
   cc -o test -Iinclude -fno-common -no-cpp-precomp  -pipe -pipe 
-fno-common -Wno-long-double  -DHASATTRIBUTE_PURE test.c
   exit code: 1
trying attribute 'HASATTRIBUTE_UNUSED'
   cc: cc
   cc -o test -Iinclude -fno-common -no-cpp-precomp  -pipe -pipe 
-fno-common -Wno-long-double  -DHASATTRIBUTE_UNUSED test.c
   exit code: 1
trying attribute 'HASATTRIBUTE_WARN_UNUSED_RESULT'
   cc: cc
   cc -o test -Iinclude -fno-common -no-cpp-precomp  -pipe -pipe 
-fno-common -Wno-long-double  -DHASATTRIBUTE_WARN_UNUSED_RESULT test.c
   exit code: 1
trying attribute 'HASATTRIBUTE_NEVER_WORKS'
   cc: cc
   cc -o test -Iinclude -fno-common -no-cpp-precomp  -pipe -pipe 
-fno-common -Wno-long-double  -DHASATTRIBUTE_NEVER_WORKS test.c
   exit code: 1

My CC:

ccache gcc -I./include -fno-common -no-cpp-precomp -pipe -pipe 
-fno-common -Wno-long-double -DHASATTRIBUTE_CONST 
-DHASATTRIBUTE_DEPRECATED -DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NORETURN 
-DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED 
-DHASATTRIBUTE_WARN_UNUSED_RESULT -I/sw/include -I/sw/include -I 
/sw/include -g -W -Wall -Wundef -Wmissing-declarations 
-Wstrict-prototypes -Wmissing-prototypes -Winline -Wpointer-arith 
-Wcast-qual -Wwrite-strings -Waggregate-return -Winline -Wno-unused 
-Wnested-externs -Wsign-compare -falign-functions=16 
-Wformat-nonliteral -Wformat-security -Wpacked -Wdisabled-optimization 
-Wno-shadow -DHAS_JIT -DPPC -DHAVE_COMPUTED_GOTO -I. -o xx.o -c xx.c


And some of gcc's output.

include/parrot/stacks.h:56: warning: `warn_unused_result' attribute 
directive ignored
include/parrot/stacks.h:56: warning: `warn_unused_result' attribute 
directive ignored
include/parrot/stacks.h:68: warning: `warn_unused_result' attribute 
directive ignored
include/parrot/stacks.h:80: warning: `warn_unused_result' attribute 
directive ignored



Re: [perl #44389] Excessive warnings on Apple's gcc 3.3 wrt attributes

2007-08-03 Thread James E Keenan

Joshua Isom wrote:
# New Ticket Created by  Joshua Isom 
# Please include the string:  [perl #44389]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=44389 



The new attribute configure code seems to get a false positive with 
warn_unused_result on Apple's gcc 3.3.




Confirmed.  Over the last few weeks, my log of my 'make' output on 
Darwin has tended to run in the range of 70-73K.  Tonight it ran to

over 7.1M.

-rw-r--r--   1 jimk  jimk70806 Jul 14 17:43 14.07.2007.make.04.txt
-rw-r--r--   1 jimk  jimk71898 Jul 15 10:30 15.07.2007.make.txt
-rw-r--r--   1 jimk  jimk73181 Jul 22 21:17 21.07.2007.make.txt
-rw-r--r--   1 jimk  jimk  7167507 Aug  3 21:43 03.08.2007.make.txt

I certainly hope someone can patch this; it's not an area in which I 
have any expertise.   Thank you very much.
Summary of my parrot 0.4.14 (r20463) configuration:
  configdate='Sat Aug  4 01:28:41 2007 GMT'
  Platform:
osname=darwin, archname=darwin-2level
jitcapable=1, jitarchname=ppc-darwin,
jitosname=DARWIN, jitcpuarch=ppc
execcapable=1
perl=/usr/local/bin/perl
  Compiler:
cc='/usr/bin/gcc-3.3', ccflags='-fno-common -no-cpp-precomp  -pipe 
-I/usr/local/include -pipe -fno-common -Wno-long-double  -DHASATTRIBUTE_CONST 
-DHASATTRIBUTE_DEPRECATED -DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NORETURN 
-DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED -DHASATTRIBUTE_WARN_UNUSED_RESULT',
  Linker and Libraries:
ld='/usr/bin/g++-3.3', ldflags=' -L/usr/local/lib 
-L/Users/jimk/work/parrot/blib/lib -flat_namespace ',
cc_ldflags='',
libs='-lm'
  Dynamic Linking:
share_ext='.dylib', ld_share_flags='-dynamiclib -undefined suppress',
load_ext='.bundle', ld_load_flags='-bundle -undefined suppress'
  Types:
iv=long, intvalsize=4, intsize=4, opcode_t=long, opcode_t_size=4,
ptrsize=4, ptr_alignment=1 byteorder=4321, 
nv=double, numvalsize=8, doublesize=8


Re: [perl #44389] Excessive warnings on Apple's gcc 3.3 wrt attributes

2007-08-03 Thread chromatic
On Friday 03 August 2007 18:45:37 James E Keenan wrote:

 Confirmed.  Over the last few weeks, my log of my 'make' output on
 Darwin has tended to run in the range of 70-73K.  Tonight it ran to
 over 7.1M.

r20454 doesn't help.  Of course, it looks like that's papering over the fact 
that the noreturn attribute expands (for me on x86 Linux, that is) to:

#define PARROT_DOES_NOT_RETURN  /[EMAIL PROTECTED]@*/ 
__attribute__noreturn__

... when it looks like it should be:

#define PARROT_DOES_NOT_RETURN  /[EMAIL PROTECTED]@*/ 
__attribute__((noreturn))

So I'm not sure what went weird.

-- c