guile-devel
[Top][All Lists]
Advanced

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

Re: compiler hints


From: Matthias Koeppe
Subject: Re: compiler hints
Date: 11 Jun 2001 12:44:39 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.6

Marius Vollmer <address@hidden> writes:

> Dirk Herrmann <address@hidden> writes:
> 
> > Thus, I suggest:
> > 
> > * Add a section {Compiler hints} to __scm.h
> > * Move the definition of SCM_NORETURN from error.h to __scm.h
> > * Add a definition SCM_UNUSED to __scm.h
> > * Add SCM_UNUSED to intentionally unused parameters.
> 
> Good idea.

I would like to point out that not all compilers can be hinted in the
way you try to do.  For instance, the Sun Forte compilers can be
hinted but they need a pragma looking like the patch at the end of the
message illustrates.  It is not possible to define SCM_NORETURN
appropriately.  

Any idea for a more general solution that allows support for a wider
range of compilers?

Index: libguile/error.h
===================================================================
RCS file: /cvs/guile/guile-core/libguile/error.h,v
retrieving revision 1.30
diff -u -r1.30 error.h
--- libguile/error.h    2001/06/07 21:12:19     1.30
+++ libguile/error.h    2001/06/11 10:38:09
@@ -74,6 +74,13 @@
                             SCM args) SCM_NORETURN;
 extern void scm_init_error (void);
 
+#pragma does_not_return(scm_error, scm_error_scm, scm_strerror,                
                \
+                       scm_syserror, scm_syserror_msg,                         
        \
+                       scm_num_overflow, scm_out_of_range,                     
        \
+                       scm_out_of_range_pos, scm_wrong_num_args,               
        \
+                       scm_error_num_args_subr, scm_wrong_type_arg,            
        \
+                       scm_wrong_type_arg_msg, scm_memory_error, 
scm_misc_error)
+

 
 #if (SCM_DEBUG_DEPRECATED == 0)

-- 
Matthias Köppe -- http://www.math.uni-magdeburg.de/~mkoeppe



reply via email to

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