On Tue, 3 Jun 2008, peter green wrote: >>> In C afaict you cannot copy structures through assignment or return them >>> as a function result. >> >> You can do both. >> > Well I couldn't with the C compiler i've been working with recently (and > old version of gcc), maybe this changed in a more recent C standard This feature was standardized nearly 20 years ago. Does this compiler not claim ANSI compatibility? > it is certainly not behaviour that can be relied opon in code that is to > be portable I wouldn't draw that conclusion from one very unusual compiler that might not be claiming to be a standard C compiler. > (much like the ability to declare variables anywhere in a > block can't be relied on). That was standardized "just" nine years ago, and yes, few compilers in the small embedded space have fully adopted C99 functionality. Many consider C99 features to be non-portable. -- John W. Temples, III -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist