Path: utzoo!attcan!uunet!husc6!bloom-beacon!mcgill-vision!mouse From: mouse@mcgill-vision.UUCP (der Mouse) Newsgroups: comp.lang.c Subject: Re: putting stuff in the text segment Message-ID: <1155@mcgill-vision.UUCP> Date: 12 Jun 88 10:22:51 GMT References: <3813@lynx.UUCP> <1457@laidbak.UUCP> Distribution: na Organization: McGill University, Montreal Lines: 26 In article <1457@laidbak.UUCP>, daveb@laidbak.UUCP (Dave Burton) writes: > In article <3813@lynx.UUCP> m5@lynx.UUCP (Mike McNally) writes: >> Does a widely-accepted syntax extension to put data structures in >> the text segment exist? > I dunno of any language extensions, per se, to accomplish this. [...] > Sun (OS3.2) has embellished cc with a -R flag that accomplishes the > same thing with a whole lot less trouble. This is not Sun's innovation. The -R flag exists in 4.3 and I believe it existed in 4.2 as well. > I believe that using the -R approach is superior to changing the > language. (It is certainly more portable.) It is definitely more portable. However, it has one disadvantage: it applies to the entire file. You can't have a mostly-normal file with three strings going in the text segment, for example. On the whole, I think changing the language is better *if* everyone adopts the same way of doing so. (This appears to be the intent of the ANSI "const" keyword.) der Mouse uucp: mouse@mcgill-vision.uucp arpa: mouse@larry.mcrcim.mcgill.edu