Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!cmcl2!phri!marob!daveh From: daveh@marob.MASA.COM (Dave Hammond) Newsgroups: comp.lang.c Subject: Strange cc warning Message-ID: <490@marob.MASA.COM> Date: 30 Jan 89 23:21:05 GMT Reply-To: daveh@marob.masa.com (Dave Hammond) Organization: ESCC New York City Lines: 28 Ok, I've racked my brain long enough on this one. System is a vanilla 386 running SCO Xenix 2.3 -- when compiling with the standard warning level (-W 1) I get no warnings at all; when I switch to the next higher warning level (-W 2) the following completely unobvious warning appears: ../include/dsipriv.h(88) : warning 74: non standard extension used - 'macro formals in strings' (I inserted the newline after "warning 74:" for readability) The macro in question is defined as follows: /* copy IN to OUT for LEN chars, enclosing OUT in dbl. quotes */ #define REQUOTE(in, out, len) if ((in) && (out)) { \ *(out) = '"'; \ Line 88 ---------------------> strncpy((out)+1, (in), (len)); \ (out)[(len)-1] = 0; \ strcat((out), "\""); \ (in) = (out); } Note that this is a warning, not an error. The program compiles fine and the macro does as intended. If any kind soul can clue me as to the problem in the above macro, I'd be for(;;) indebted. -- Dave Hammond ...!uunet!masa.com!{dsix2,marob}!daveh