[Gllug] SIGSEGV error
t.clarke
tim at seacon.co.uk
Thu Aug 30 06:51:40 UTC 2007
I beg to differ about the 'gotcha' !
I have a C compiler on a Unix box that ordinarily places such strings in the
'bss' area (or whatever its called) and thus allows them to me modified later.
Its a convenient way of initialising a string which can be modified as the
program executes.
If the GNU compiler chooses to always place such strings in the text area
thats up to it - but if a program was written originally on a machine
with a compiler that uses the 'looser' behavior it will implode when
compiled on a GNU compiler !
The -frwitable-strings switch was clearly a workaround for this problem
- IMHO its a shame its been removed as it means possibly some older C source
will have to be modified instead if simply compiled with the extra switch.
In any event my comments were not intended as a critique of the C compiler or
language, merely pointing out a possible source of the problem, since it stung
me in the past !
Tim
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list