[Gllug] SIGSEGV error

t.clarke tim at seacon.co.uk
Fri Aug 31 08:59:12 UTC 2007


Nix

many thanks for the further explanation of waht -fwritable-strings does/did


My recollections of this particular problem I encountered some years back are a
little hazy, other than the fact that a C program compiled and working fine on
a SCO Openserver machine (using the SDCO compiler) fell over when compiled on
a GCC compiler without the use of -fwritable-strings.

I believe in the main() section there was a string variable declared either as

char yyx[]="thequickbrownfoxsatonthelazydog"
or
char *xyz="thequickbrownfoxsatonthelazydog"


I neither case was it declared to be static;  maybe that was the mistake ?


I am afraid that my C programming is self-taught from picking up examples and
I have undoubtedly picked up some misconceptions and bad habits along the way.

If I can locate the bit of 'offending' code I will revisit it and see where
the coding problem lies !

Tim
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list