#define LFDF 'a' /* Library Function Definition */
#define LVDF 'b' /* Library Variable Definition */
-#define EFDF 'c' /* External Function Definition */
-#define EVDF 'd' /* External Variable Definition */
-#define EFDC 'e' /* External Function Declaration */
-#define EVDC 'f' /* External Variable Declaration */
-#define IFDC 'g' /* Implicit Function Declaration */
-#define SFDF 'h' /* Static Function Definition */
-#define SVDF 'i' /* Static Variable Definition */
-#define FC 'j' /* Function Call */
-#define VU 'k' /* Variable Usage */
-#define XXDF 'l' /* Ignore Class */
+
+#define PFDF 'd' /* Prototype Function Definition */
+
+#define EFDF 'f' /* External Function Definition */
+#define EVDF 'g' /* External Variable Definition */
+#define EFDC 'h' /* External Function Declaration */
+#define EVDC 'i' /* External Variable Declaration */
+
+#define IFDC 'm' /* Implicit Function Declaration */
+
+#define SFDF 'q' /* Static Function Definition */
+#define SVDF 'r' /* Static Variable Definition */
+
+#define FC 'u' /* Function Call */
+#define VU 'v' /* Variable Usage */
+
+#define XXDF 'z' /* Ignore Class */
+
+/* Two meta-definitions */
+#define MIN_CLASS_CONST LFDF
+#define MAX_CLASS_CONST XXDF
#define C_lin(c)
#define C_loi(c)
#define C_lol(c)
+#define C_ret(c)
#define C_sdl(c)
#define C_sti(c)
#define C_stl(c)
break;
}
+ if (from == VOID) {
+ /* OK any which way */
+ }
+ else
if (from == CHAR) {
hwarning("pointer to char may not align correctly for a %s",
symbol2str(to));
PRIVATE outarg();
PRIVATE outargstring();
PRIVATE outargtype();
-PRIVATE fill_arg();
+PRIVATE add_expr_arg();
lint_declare_idf(idf, sc)
struct idf *idf;
lint_formals()
{
-/* Make a list of tp_entries containing the types of the formal
+/* Make a list of 'struct argument's containing the types of the formal
* parameters of the function definition just parsed.
*/
register struct stack_entry *se = stack_level_of(L_FORMAL1)->sl_entry;
output_def(od)
struct outdef *od;
{
-/* As the types are output the tp_entries are removed, because they
+/* As the types are output the 'struct argument's are removed, because they
* are then not needed anymore.
*/
if (od->od_class == XXDF || !od->od_name || od->od_name[0] == '#')
od->od_class = LVDF;
break;
case SFDF:
- /* remove tp_entries */
+ /* remove 'struct argument's */
while (od->od_arg) {
register struct argument *tmp = od->od_arg;
od->od_arg = od->od_arg->next;
OutCall.od_arg = (struct argument *)0;
OutCall.od_nrargs = 0;
- if ((ex = ex->OP_RIGHT) != 0) { /* function call with arguments */
- /* store types of argument expressions in tp_entries */
+ if ((ex = ex->OP_RIGHT) != 0) {
+ /* function call with arguments */
+ /* store types of argument expressions in 'struct argument's */
while (ex->ex_class == Oper && ex->OP_OPER == PARCOMMA) {
- fill_arg(ex->OP_RIGHT);
+ add_expr_arg(ex->OP_RIGHT);
ex = ex->OP_LEFT;
}
- fill_arg(ex);
+ add_expr_arg(ex);
}
OutCall.od_valused = used; /* USED, IGNORED or VOIDED */
}
PRIVATE
-fill_arg(e)
+add_expr_arg(e)
struct expr *e;
{
register struct argument *arg;
#define ArgExpr 1 /* actual */
#define ArgConst 2 /* integer constant */
#define ArgString 3 /* string */
+#define ArgEllipsis 4 /* ellipsis */
struct argument {
struct argument *next;