Re: [patches] more declarations fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 10, 2009 at 02:27:26PM -0700, Christopher Li wrote:
> On Mon, Mar 9, 2009 at 12:10 AM, Al Viro <viro@xxxxxxxxxxxxxxxx> wrote:
> >
> > OK, that pile ought to take care of a lot of nastiness. ?We still have
> > rather messy crap in attributes' handling, but it's actually getting
> > cleaner now. ?In particular, direct_declarator and declaration_specifiers
> > are relatively sane, handling of type specifiers should be correct now (and
> > much cleaner than it used to be) and most of the tangled mess around
> > attributes is untangled. ?Still a mess, but at least doing something
> > about it becomes feasible...
> >
> 
> I really like these series of patches. All applied.
> 
> It is much cleaner now.
> 
> BTW, what does Set_S and Set_T means? Symbol and type?

s/symbol/solitary/, actually (it's used for the things that don't mix with
other specifiers at all).  T is more or less "type" - it's for the large
group of specifiers that are mutually exclusive (int/char/double/float/all
solitary ones - the only things that are *not* part of that set are
signed/unsigned/long/short).  For the sake of completeness, Set_Vlong (used
to track having seen "long" twice) comes from the name Plan 9 C compiler
used (pre-C99) for long long; they call it vlong, presumably with "v" for
"very".

FWIW, float could be considered solitary too, if not for (yet to be supported)
_Complex.  Parser-side modifications to support that would be fairly simple,
especially if we support gcc extensions[1].  Of course, we'd need to deal
with that more than just in parser - expand.c and evaluate.c at the very
least, and we'd need new EXPR_... node types for constant values...


[1] C99 gives parser a bit of a wart since _Complex, _Complex long and
long _Complex are not accepted, so we get valid combinations that have
invalid prefices; not a big deal.  Requires slightly different definition
for complex_op and an extra check and warning in the end of process.
gcc, out of either laziness or sheer insanity allows complex for *any*
arithmetic types, even though e.g. complex char makes no sense whatsoever,
so it's even simpler for parser to deal with.
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux