[#688] mkmf.rb - add files to clean and distclean targets — Michal Rokos <michal@...>

Hi,

25 messages 2003/01/15
[#722] Re: [RFC] mkmf.rb - add files to clean and distclean targets — Mathieu Bouchard <matju@...> 2003/01/20

On Thu, 16 Jan 2003, Michal Rokos wrote:

[#740] Re: [RFC] mkmf.rb - add files to clean and distclean targets — matz@... (Yukihiro Matsumoto) 2003/01/21

Hi,

[#724] Symbols: More Functionality Wanted — Ryan Pavlik <rpav@...>

I've been discussing this for a bit on #ruby-lang on OPN (or freenode or

23 messages 2003/01/20
[#728] Re: Symbols: More Functionality Wanted — matz@... (Yukihiro Matsumoto) 2003/01/20

Hi,

[#743] Re: Symbols: More Functionality Wanted — "Pit Capitain" <pit@...> 2003/01/21

On 20 Jan 2003 at 15:49, Yukihiro Matsumoto wrote:

[#767] Re: Symbols: More Functionality Wanted — Mathieu Bouchard <matju@...> 2003/01/22

[#768] Re: Symbols: More Functionality Wanted — dblack@... 2003/01/22

Hi --

[#779] Re: Symbols: More Functionality Wanted — Gavin Sinclair <gsinclair@...> 2003/01/23

On Thursday, January 23, 2003, 6:28:04 AM, dblack wrote:

Re: [Patch] Wall compilation

From: Michal Rokos <michal@...>
Date: 2003-01-16 12:22:01 UTC
List: ruby-core #701
Hi,

nobu.nokada@softhome.net wrote:
> At Thu, 16 Jan 2003 15:38:09 +0900,
> Michal Rokos wrote:
> 
>>>>	If you read the patch, please note change in defines.h
>>>>	FLUSH_REGISTER_WINDOWS is now defined everytime, but
>>>>	compilation with -O2 handles empty proc body quite well
>>>>	(ie. no code - no useless jumps).
>>>
>>>Is it needed?
>>
>>	Try -Wall compilation. It warns badly (gcc-3.2.2) about the
>>	code has no effect and so on, which looks ugly to me. This
>>	patch has the same result (code has no effect), but without
>>	warnings from compiler.
> 
> 
>>>What about ((void)0) ?
>>
>>	Again - gcc warns about 'code has no effect'...
> 
> 
> I've used this (void)0 trick many times, we have to replace
> them all to make gcc 3.2.2 quiet?
> 
> Anyhow, what it defines assert() in <assert.h> if NDEBUG?

	You're right - as usually :))

	Thank you for giving me a lesson :)

	Here's a small patch that does what nobu says.

		Michal


Attachments (1)

RubyWall2.diff (1.56 KB, text/x-diff)
Index: defines.h
===================================================================
RCS file: /src/ruby/defines.h,v
retrieving revision 1.26
diff -u -p -r1.26 defines.h
--- defines.h	16 Jan 2003 07:38:39 -0000	1.26
+++ defines.h	16 Jan 2003 12:15:03 -0000
@@ -137,10 +137,10 @@ void xfree _((void*));
 #define EXTERN extern
 #endif
 
+#if defined(sparc) || defined(__sparc__)
 static inline void
 flush_register_windows(void)
 {
-#if defined(sparc) || defined(__sparc__)
 # if defined(__sparc_v9__) || defined(__arch64__)
     asm volatile ("flushw" : :);
 # elif defined(linux) || defined(__linux__)
@@ -148,9 +148,11 @@ flush_register_windows(void)
 # else /* Solaris, OpenBSD, NetBSD, etc. */
     asm volatile ("ta  0x03");
 # endif /* trap always to flush register windows if we are on a Sparc system */
-#endif 
 }
-#define FLUSH_REGISTER_WINDOWS	flush_register_windows()
+#  define FLUSH_REGISTER_WINDOWS flush_register_windows()
+#else
+#  define FLUSH_REGISTER_WINDOWS ((void)0)
+#endif 
 
 #if defined(DOSISH)
 #define PATH_SEP ";"
Index: eval.c
===================================================================
RCS file: /src/ruby/eval.c,v
retrieving revision 1.386
diff -u -p -r1.386 eval.c
--- eval.c	16 Jan 2003 07:38:39 -0000	1.386
+++ eval.c	16 Jan 2003 12:16:26 -0000
@@ -938,7 +938,7 @@ static void call_trace_func _((char*,NOD
 #define SET_CURRENT_SOURCE() (ruby_sourcefile = ruby_current_node->nd_file, \
 			      ruby_sourceline = nd_line(ruby_current_node))
 #else
-#define SET_CURRENT_SOURCE() do { } while (0)
+#define SET_CURRENT_SOURCE() ((void)0)
 #endif
 
 void

In This Thread