info-sather
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patches


From: Sather User
Subject: Patches
Date: Tue, 26 May 2009 05:19:58 +0930 (CST)

Compiling Sather with gcc 4.5.0 produces numerous warnings about qualified void returns:

hello.c:4: warning: function definition has qualified void return type

I suggest for now the following, which adds a new compiler file allowing things within the tree to be adjusted. The new file might later be used to turn on warnings selectively. Just now it adds a -w to CFLAGS in the generated C code:

diff -NrC3 Sather-1.2b3/Compiler/Back/cgen.sa Sather-1.2b4/Compiler/Back/cgen.sa
*** Sather-1.2b3/Compiler/Back/cgen.sa  2009-05-10 17:05:38.000000000 +0930
--- Sather-1.2b4/Compiler/Back/cgen.sa  2009-05-26 04:29:43.000000000 +0930
***************
*** 937,943 ****

        -- esc 1996/06/07: Space has to be *before* '-I.' option
        --allflags:=allflags+"-I. ";
!       allflags:=allflags+" -I.";

        if debug then
         allflags:=allflags+' '+prog.config.get_str("CC_DEBUG_FLAG",1);
--- 937,945 ----

        -- esc 1996/06/07: Space has to be *before* '-I.' option
        --allflags:=allflags+"-I. ";
!       -- mtw 2009/05/26: Allow tuning of the flags
!       --allflags:=allflags+" -I.";
!       allflags:=allflags+" "+TUNER::cgen_cflags_tune+" -I.";

        if debug then
         allflags:=allflags+' '+prog.config.get_str("CC_DEBUG_FLAG",1);
diff -NrC3 Sather-1.2b3/Compiler/cs.module Sather-1.2b4/Compiler/cs.module
*** Sather-1.2b3/Compiler/cs.module     1996-10-18 03:43:52.000000000 +0930
--- Sather-1.2b4/Compiler/cs.module     2009-05-26 04:01:45.000000000 +0930
***************
*** 30,35 ****
--- 30,37 ----
  Representation/Representation.module
  --pSather/pSather.module -- ptrans.sa has been moved into trans.sa

+ -has tuner.sa TUNER
+ -C_flag -w
  -verbose
  cs.sa

diff -NrC3 Sather-1.2b3/Compiler/tuner.sa Sather-1.2b4/Compiler/tuner.sa
*** Sather-1.2b3/Compiler/tuner.sa      1970-01-01 09:30:00.000000000 +0930
--- Sather-1.2b4/Compiler/tuner.sa      2009-05-26 04:03:36.000000000 +0930
***************
*** 0 ****
--- 1,3 ----
+ class TUNER is
+    const cgen_cflags_tune:STR:="-w"
+ end;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]