On Sat, 8 Mar 2008 12:20:10 -0600 (CST), Barry Schwarz
<schwarzb@[EMAIL PROTECTED]
> wrote:
> On Sun, 17 Feb 2008 12:04:40 -0600 (CST), Chris LaVelle
> <cjlavelle@[EMAIL PROTECTED]
> wrote:
> >typedef struct XXX_ELEMENT_tag
> >{
> > UINT8 num;
> > UINT8 param;
> > UINT16 fre1;
> > INT16 a1;
> >} ;
>
> This is a syntax error. You either
> remove the typedef from in front of the declaration or
> you include the "new name" ELEMENT_T before the final
> semicolon and delete the next declaration.
>
It's not a syntax error. It's legal to have a declaration with no
declarators as long as the decl-specifiers declare a tag or
enumerator(s). Putting a storage-class, which for this purpose
includes 'typedef', in such a declaration has no effect, and is silly
and confusing, but does not require a diagnostic. Some compilers give
a warning, precisely because this combination is so unlikely to be
wanted, but not an error, because it is legal.
- formerly david.thompson1 || achar(64) || worldnet.att.net
--
comp.lang.c.moderated - moderation address: clcm@[EMAIL PROTECTED]
-- you must
have an appropriate newsgroups line in your header for your mail to be
seen,
or the newsgroup name in square brackets in the subject line. Sorry.


|