CVS: msp430-libc/include isr_compat.h,1.2,1.3

Steve Underwood <[email protected]>
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.cvs
Message-ID <[email protected]>
Update of /cvsroot/mspgcc/msp430-libc/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4327/msp430-libc/include

Modified Files:
	isr_compat.h 
Log Message:
Fixed used of illegal #pragma within a macro, using _Pragma instead


Index: isr_compat.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/isr_compat.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- isr_compat.h	2 Nov 2005 01:12:36 -0000	1.2
+++ isr_compat.h	8 Dec 2005 17:29:52 -0000	1.3
@@ -54,6 +54,9 @@
     }
 */
 
+/* A tricky #define to stringify _Pragma parameters */
+#define __PRAGMA__(x) _Pragma(#x)
+
 #if defined(__GNUC__)  &&  defined(__MSP430__)
     /* This is the MSPGCC compiler */
 #define ISR(a,b) interrupt(a ## _VECTOR) b(void)
@@ -65,7 +68,8 @@
 #define ISR(a,b) interrupt[a ## _VECTOR] void b(void)
 #elif defined(__IAR_SYSTEMS_ICC__)  &&  (((__TID__ >> 8) & 0x7f) == 43)  &&  (__VER__ < 400)
     /* This is V2.xx or V3.xx of the IAR compiler. */
-#define ISR(a,b) #pragma vector = a ## _VECTOR \
+#define ISR(a,b) \
+__PRAGMA__(vector=a ##_VECTOR) \
 __interrupt void b(void)
 #elif defined(__CROSSWORKS_MSP430)
     /* This is the Rowley Crossworks compiler */



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.