develooper Front page | perl.perl6.internals | Postings from January 2002

brief RANT (on warnings)

Thread Next
From:
Nicholas Clark
Date:
January 12, 2002 09:38
Subject:
brief RANT (on warnings)
Message ID:
20020112173419.A2594@Bagpuss.unfortu.net
What's the point of having a policy of turning gcc's warnings to painful
levels when it appears that commit policy will accept new code that increases
the number of compiler warnings?

eg, why is there need to patch this?

--- global_setup.c.orig Thu Jan 10 18:01:51 2002
+++ global_setup.c      Sat Jan 12 17:27:32 2002
@@ -21,6 +21,7 @@
 void Parrot_PerlString_class_init(void);
 void Parrot_PerlArray_class_init(void);
 void Parrot_PerlHash_class_init(void);
+void Parrot_ParrotPointer_class_init(void);
 
 void
 init_world(void) {


end RANT. Awkward question:

interpreter.c:69: warning: cast increases required alignment of target type

If we're serious about -Wcast-align we MUST change the generic pointer from
void * (which will have the most loose cast alignment) to something that
has the highest alignment on the given machine. (typically double *, I'd
assume).

All the world is not a VAX^Wx86, and on some platforms we're compiling on
even int * must be aligned, let alone things like long double * or complex
structs.

If we're not serious about doing this, please could we drop -Wcast-align

Nicholas Clark
-- 
ENOJOB http://www.ccl4.org/~nick/CV.html

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About