Skip to contentSkip to conversation

more declarations fixes

PATCH In review Al Viro 3 participants 6 messages Mar 9, 2009 – Mar 10, 2009 Sparse checker

lore
Share & tools
lore

Al Viro

author
#0 lore raw

PATCH 1/1 more declarations fixes

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...

That series is on top of Chris' tree; equivalent on top of Josh's one is not particulary different. Have fun...

maintainer
#1 lore raw

Great change. Thanks.

I will try it out later tonight.

Chris

Quoted 9 lines · Al Viro

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...

Quoted 8 lines

That series is on top of Chris' tree; equivalent on top of Josh's one is not particulary different.  Have fun...

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 3 lines · Christopher Li

Great change. Thanks.

I will try it out later tonight.

And while we are at it, here come 3 scope-related fixes...

BTW, what in the name of everything unholy have you got in validation/static-forward-decl.c? Misplaced error line?

maintainer
#3 lore raw
Quoted 2 lines · Al Viro

BTW, what in the name of everything unholy have you got in validation/static-forward-decl.c?  Misplaced error line?

Err, that is obvious a screw up from my side. It just happen on a file supposed to fail so I did not notice it. I will clean it up.

Thanks for point it out.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer
#4 lore raw
In reply to Al Viro
Quoted 9 lines · Al Viro

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?

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw
Quoted 11 lines · Christopher Li
Quoted 9 lines · Al Viro

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...

Quoted 5 lines

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.