Deleted Added
full compact
tree.c (16073) tree.c (17142)
1/* $NetBSD: tree.c,v 1.12 1995/10/02 17:37:57 jpo Exp $ */
2
3/*
4 * Copyright (c) 1994, 1995 Jochen Pohl
5 * All Rights Reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 25 unchanged lines hidden (view full) ---

34#ifndef lint
35static char rcsid[] = "$NetBSD: tree.c,v 1.12 1995/10/02 17:37:57 jpo Exp $";
36#endif
37
38#include <stdlib.h>
39#include <string.h>
40#include <float.h>
41#include <limits.h>
1/* $NetBSD: tree.c,v 1.12 1995/10/02 17:37:57 jpo Exp $ */
2
3/*
4 * Copyright (c) 1994, 1995 Jochen Pohl
5 * All Rights Reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 25 unchanged lines hidden (view full) ---

34#ifndef lint
35static char rcsid[] = "$NetBSD: tree.c,v 1.12 1995/10/02 17:37:57 jpo Exp $";
36#endif
37
38#include <stdlib.h>
39#include <string.h>
40#include <float.h>
41#include <limits.h>
42#include <math.h>
42
43#include "lint1.h"
44#include "y.tab.h"
45
46/* Various flags for each operator. */
47static mod_t modtab[NOPS];
48
49static tnode_t *getinode __P((tspec_t, quad_t));

--- 1077 unchanged lines hidden (view full) ---

1127 warning(115, "left ", mp->m_name);
1128 }
1129 break;
1130 case COMMA:
1131 if (!modtab[ln->tn_op].m_sideeff)
1132 nulleff(ln);
1133 break;
1134 /* LINTED (enumeration values not handled in switch) */
43
44#include "lint1.h"
45#include "y.tab.h"
46
47/* Various flags for each operator. */
48static mod_t modtab[NOPS];
49
50static tnode_t *getinode __P((tspec_t, quad_t));

--- 1077 unchanged lines hidden (view full) ---

1128 warning(115, "left ", mp->m_name);
1129 }
1130 break;
1131 case COMMA:
1132 if (!modtab[ln->tn_op].m_sideeff)
1133 nulleff(ln);
1134 break;
1135 /* LINTED (enumeration values not handled in switch) */
1136 default:
1135 }
1136
1137 if (mp->m_badeop &&
1138 (ltp->t_isenum || (mp->m_binary && rtp->t_isenum))) {
1139 chkbeop(op, ln, rn);
1140 } else if (mp->m_enumop && (ltp->t_isenum && rtp->t_isenum)) {
1141 chkeop2(op, arg, ln, rn);
1142 } else if (mp->m_enumop && (ltp->t_isenum || rtp->t_isenum)) {

--- 2427 unchanged lines hidden (view full) ---

3570 if (hflag && eqwarn)
3571 warning(160);
3572 break;
3573 case CON:
3574 case NAME:
3575 case STRING:
3576 return;
3577 /* LINTED (enumeration values not handled in switch) */
1137 }
1138
1139 if (mp->m_badeop &&
1140 (ltp->t_isenum || (mp->m_binary && rtp->t_isenum))) {
1141 chkbeop(op, ln, rn);
1142 } else if (mp->m_enumop && (ltp->t_isenum && rtp->t_isenum)) {
1143 chkeop2(op, arg, ln, rn);
1144 } else if (mp->m_enumop && (ltp->t_isenum || rtp->t_isenum)) {

--- 2427 unchanged lines hidden (view full) ---

3572 if (hflag && eqwarn)
3573 warning(160);
3574 break;
3575 case CON:
3576 case NAME:
3577 case STRING:
3578 return;
3579 /* LINTED (enumeration values not handled in switch) */
3580 default:
3578 }
3579
3580 cvctx = mp->m_vctx;
3581 ctctx = mp->m_tctx;
3582 /*
3583 * values of operands of ':' are not used if the type of at least
3584 * one of the operands (for gcc compatibility) is void
3585 * XXX test/value context of QUEST should probably be used as

--- 322 unchanged lines hidden (view full) ---

3908 if (rop == PLUS || rop == MINUS) {
3909 warn = 1;
3910 } else if (rop == AND || rop == XOR) {
3911 warn = 1;
3912 }
3913 }
3914 break;
3915 /* LINTED (enumeration values not handled in switch) */
3581 }
3582
3583 cvctx = mp->m_vctx;
3584 ctctx = mp->m_tctx;
3585 /*
3586 * values of operands of ':' are not used if the type of at least
3587 * one of the operands (for gcc compatibility) is void
3588 * XXX test/value context of QUEST should probably be used as

--- 322 unchanged lines hidden (view full) ---

3911 if (rop == PLUS || rop == MINUS) {
3912 warn = 1;
3913 } else if (rop == AND || rop == XOR) {
3914 warn = 1;
3915 }
3916 }
3917 break;
3918 /* LINTED (enumeration values not handled in switch) */
3919 default:
3916 }
3917
3918 if (warn) {
3919 /* precedence confusion possible: parenthesize! */
3920 warning(169);
3921 }
3922
3923}
3920 }
3921
3922 if (warn) {
3923 /* precedence confusion possible: parenthesize! */
3924 warning(169);
3925 }
3926
3927}