lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] svn commit: r1310737 - in /lucy/trunk: clownfish/perl/buildlib/Clownfish/CFC/Build.pm clownfish/ruby/Rakefile core/Lucy/Test/Object/TestNum.c perl/buildlib/Lucy/Build.pm
Date Sat, 07 Apr 2012 11:17:55 GMT
Author: nwellnhof
Date: Sat Apr  7 11:17:55 2012
New Revision: 1310737

URL: http://svn.apache.org/viewvc?rev=1310737&view=rev
Log:
Switch from -std=gnu99 to -std=c99

This enables -fexcess-precision=standard on GCC 4.5 and above which avoids
nasty surprises with x87 excess precision.

Modified:
    lucy/trunk/clownfish/perl/buildlib/Clownfish/CFC/Build.pm
    lucy/trunk/clownfish/ruby/Rakefile
    lucy/trunk/core/Lucy/Test/Object/TestNum.c
    lucy/trunk/perl/buildlib/Lucy/Build.pm

Modified: lucy/trunk/clownfish/perl/buildlib/Clownfish/CFC/Build.pm
URL: http://svn.apache.org/viewvc/lucy/trunk/clownfish/perl/buildlib/Clownfish/CFC/Build.pm?rev=1310737&r1=1310736&r2=1310737&view=diff
==============================================================================
--- lucy/trunk/clownfish/perl/buildlib/Clownfish/CFC/Build.pm (original)
+++ lucy/trunk/clownfish/perl/buildlib/Clownfish/CFC/Build.pm Sat Apr  7 11:17:55 2012
@@ -48,7 +48,7 @@ sub extra_ccflags {
         if ( defined $gcc_version ) {
             $extra_ccflags .= "-DLUCY_DEBUG ";
             $extra_ccflags
-                .= "-DPERL_GCC_PEDANTIC -std=gnu99 -pedantic -Wall ";
+                .= "-DPERL_GCC_PEDANTIC -std=c99 -pedantic -Wall ";
             $extra_ccflags .= "-Wextra " if $gcc_version >= 3.4;    # correct
             $extra_ccflags .= "-Wno-variadic-macros "
                 if $gcc_version > 3.4;    # at least not on gcc 3.4
@@ -67,7 +67,7 @@ sub extra_ccflags {
     if ( defined $gcc_version ) {
         # Tell GCC explicitly to run with maximum options.
         if ( $extra_ccflags !~ m/-std=/ ) {
-            $extra_ccflags .= "-std=gnu99 ";
+            $extra_ccflags .= "-std=c99 ";
         }
         if ( $extra_ccflags !~ m/-D_GNU_SOURCE/ ) {
             $extra_ccflags .= "-D_GNU_SOURCE ";

Modified: lucy/trunk/clownfish/ruby/Rakefile
URL: http://svn.apache.org/viewvc/lucy/trunk/clownfish/ruby/Rakefile?rev=1310737&r1=1310736&r2=1310737&view=diff
==============================================================================
--- lucy/trunk/clownfish/ruby/Rakefile (original)
+++ lucy/trunk/clownfish/ruby/Rakefile Sat Apr  7 11:17:55 2012
@@ -132,7 +132,7 @@ def extra_ccflags 
   # Blindly include GCC-specific flags even though we don't know that the
   # compiler is GCC.
   if ccflags !~ /-std=/
-    ccflags += "-std=gnu99 "
+    ccflags += "-std=c99 "
   end
   if ccflags !~ /-D_GNU_SOURCE/ 
     ccflags += "-D_GNU_SOURCE "

Modified: lucy/trunk/core/Lucy/Test/Object/TestNum.c
URL: http://svn.apache.org/viewvc/lucy/trunk/core/Lucy/Test/Object/TestNum.c?rev=1310737&r1=1310736&r2=1310737&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Test/Object/TestNum.c (original)
+++ lucy/trunk/core/Lucy/Test/Object/TestNum.c Sat Apr  7 11:17:55 2012
@@ -177,6 +177,11 @@ test_Equals_and_Compare_To(TestBatch *ba
     TEST_TRUE(batch, Int32_Compare_To(i32, (Obj*)f32) < 0,
               "Integer32 comparison to Float32");
 
+    Int64_Set_Value(i64, 0x6666666666666666LL);
+    Integer64 *i64_copy = Int64_new(0x6666666666666666LL);
+    TEST_TRUE(batch, Int64_Compare_To(i64, (Obj*)i64_copy) == 0,
+              "Integer64 comparison to same number");
+
     TEST_TRUE(batch, Bool_Equals(CFISH_TRUE, (Obj*)CFISH_TRUE),
               "CFISH_TRUE Equals itself");
     TEST_TRUE(batch, Bool_Equals(CFISH_FALSE, (Obj*)CFISH_FALSE),
@@ -188,6 +193,7 @@ test_Equals_and_Compare_To(TestBatch *ba
     TEST_FALSE(batch, Bool_Equals(CFISH_TRUE, (Obj*)CHARBUF),
                "CFISH_TRUE not Equals random other object ");
 
+    DECREF(i64_copy);
     DECREF(i64);
     DECREF(i32);
     DECREF(f64);
@@ -291,7 +297,7 @@ test_serialization(TestBatch *batch) {
 
 void
 TestNum_run_tests() {
-    TestBatch *batch = TestBatch_new(57);
+    TestBatch *batch = TestBatch_new(58);
     TestBatch_Plan(batch);
 
     test_To_String(batch);

Modified: lucy/trunk/perl/buildlib/Lucy/Build.pm
URL: http://svn.apache.org/viewvc/lucy/trunk/perl/buildlib/Lucy/Build.pm?rev=1310737&r1=1310736&r2=1310737&view=diff
==============================================================================
--- lucy/trunk/perl/buildlib/Lucy/Build.pm (original)
+++ lucy/trunk/perl/buildlib/Lucy/Build.pm Sat Apr  7 11:17:55 2012
@@ -90,7 +90,7 @@ sub new {
 
     my $extra_ccflags = $self->extra_compiler_flags;
     if ( $self->config('gccversion') ) {
-        push @$extra_ccflags, qw( -std=gnu99 -D_GNU_SOURCE );
+        push @$extra_ccflags, qw( -std=c99 -D_GNU_SOURCE );
         if ( $Config{osname} =~ /openbsd/i && !$Config{usethreads} ) {
             push @$extra_ccflags, '-DLUCY_NOTHREADS';
         }



Mime
View raw message