Article View: gnu.gcc.help
Article #41444GCC and Threads/Interrupts
From: tmc
Date: Mon, 08 Apr 1996 00:00
Date: Mon, 08 Apr 1996 00:00
17 lines
1048 bytes
1048 bytes
If a method returns an instance of a class, GCC places the return value, (for reasons of efficiency) in a statically allocated section of memory (.lcomm). This causes fatal problems when threads and interrupts call methods that also modify this area of memory. I have changed my code to avoid this situation but would prefer to make coding decisions for reasons other than compiler limitations. It also makes it very hard to write things like: friend Decimal operator + (Decimal &left, Decimal &right); Does GCC support a switch (or like) to return structures on the stack? I'm running GCC 2.6.3 as a cross compiler under OS2 for the Motorola 68332. Thanks Mark Cyster
Technical Details
Message-ID:
<4kb2h6$k1e@netnews.hinet.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,3d1bd3236cb97d8e,start X-Google-Attributes: gid11318c,public From: tmc@c2.hinet.net Subject: GCC and Threads/Interrupts Date: 1996/04/08 Message-ID: <4kb2h6$k1e@netnews.hinet.net> X-Deja-AN: 146354611 organization: DCI HiNet reply-to: tmc@ms2.hinet.net newsgroups: gnu.gcc.help