Commit Graph

326 Commits

Author SHA1 Message Date
christos 1a90c89fed Add __alignof__. 2009-05-02 16:10:49 +00:00
christos 6892362adf add variable declarations in for loops for c99 2009-05-01 22:03:36 +00:00
ginsbach 5fabed93f9 Print left and right type and not left type twice. (Hi Christos!) 2009-04-27 15:08:10 +00:00
christos 7f812cd511 Lukemify (WARNS=4) 2009-04-15 01:20:57 +00:00
lukem ae780f8105 Compile lint with WARNS=3.
Currently there are too many -Wsign-compare issues for WARNS=4.
2009-04-14 09:09:59 +00:00
lukem e54a1dbe60 fix -Wcast-qual issues 2009-04-14 09:08:39 +00:00
lukem 4bfb0e2161 Fix -Wshadow and -Wcast-qual issues 2009-04-14 09:06:25 +00:00
lukem 4c61b31086 Fix -Wshadow issues 2009-04-14 09:03:45 +00:00
lukem 4c213f3e71 Fix -Wcast-qual issue 2009-04-14 08:59:45 +00:00
christos 3f7bbc73e3 since we know the types, print what they are in error messages. 2009-04-13 21:17:37 +00:00
joerg fda71aab5e Remove use of .Xo/.Xc to workaround argument number limit. 2009-03-10 13:44:02 +00:00
christos 7c8a9296cc Don't produce type mismatch warnings if one side of ?: is "[qual] void *"
and the other side is "[qual] pointer".
2009-03-02 20:53:10 +00:00
uebayasi febab96b71 Comment out CFLAGS+=-g. 2009-02-14 14:05:58 +00:00
lukem 998789a8d9 this code isn't -Wsign-compare friendly -- drop the WARNS to 3. 2009-02-13 01:27:43 +00:00
joerg 7d8b9145a5 Ignore restrict in the contexts where const and volatile is allowed.
No validation for the use (e.g. that it is used on a pointer), but
enough to not stop valid C99 programs.
2008-12-10 16:12:39 +00:00
dholland 3c6470e287 WARNS=4 2008-11-16 07:06:37 +00:00
dholland 96ee89a3c5 Fix wrong memset; PR bin/39733 from Henning Petersen. 2008-10-13 14:00:37 +00:00
dholland c92bbe4462 Don't accidentally treat "long double" as "long". PR bin/39639. 2008-09-27 20:04:24 +00:00
matt c58ed3675c Add the complex types to the floating point promotion rules. 2008-09-27 02:30:46 +00:00
matt 2ded04cde2 Add a missing label for LCOMPLEX 2008-09-26 23:51:04 +00:00
matt 9364aa71ae Teach lint about long double _Complex (C99) 2008-09-26 22:52:24 +00:00
joerg 8a89a3dc54 Check value range of ULONG and UQUAD values. On 32 bit platforms like
i386 "unsigned long x = 0x800000000UL;" passed lint and gcc complains
(rightfully). Validate quad as well to allow using a potentially larger
type to store the value.
2008-09-10 14:05:00 +00:00
gmcgarry 15631ee3b4 Undefine __PCC__ the same as __GNUC__ inside lint. 2008-08-29 00:44:48 +00:00
apb 4e07a05b2d Lint predefines the following symbols: "__LINT__", "lint", "__lint", and
"__lint__"; not only "lint" as the man page previously claimed.
2008-08-02 12:05:48 +00:00
christos 2703aa2d0d enable -P 2008-07-31 15:25:18 +00:00
christos 8bba9bd7b0 document P 2008-07-31 15:24:09 +00:00
christos 3457928c2a Add Picky flag; this produces more warnings:
1. long a; int i; a = i * i;
   suggests casting i to long, so that we gain precision in the multiplication.
2. warns about magnitude comparisons in enums.
3. warns about possible sign extension issues when integer types become widened.
2008-07-31 15:21:34 +00:00
dsl d4d6980a4b Add a check for 'continue' inside a 'do ... while (0)' loop.
'continue' has the same effect as 'break' - as that probably isn't
what the writer had in mind!
2008-07-25 18:33:53 +00:00
christos 26acf9f9d6 don't check for NaN if fpe. 2008-05-03 16:28:56 +00:00
christos 00c6e78061 Since we cannot guarantee that all machines do ieee math, or that they have
the proper math setup deal with SIGFPE directly.
2008-05-02 15:10:05 +00:00
christos ee5dd5c8d7 fix const and volatile printing in types. 2008-05-01 21:52:19 +00:00
christos 1347903131 PR/38543: Valery Ushakov: Don't crash printing anonymous unions. XXX: Type
printing is phase2 is buggy since it does not print the qualifiers, but this
is for another day.
2008-05-01 15:39:33 +00:00
martin 11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
christos cb68ac0e9c print the types involved in an error. 2008-04-27 01:45:04 +00:00
christos acfccdf2a5 reorder a couple of error messages. 2008-04-27 00:13:58 +00:00
christos 3123c3e08f Fix complex double to be '\0' instead of 'u', from Nicolas Joly. 2008-04-26 23:34:55 +00:00
christos 0ab7d1a4f5 same change: double is emitted as '\0' 2008-04-26 20:31:45 +00:00
christos 93cd306a8f make the complex float/double annotated consistently with regular float/double. 2008-04-26 20:11:09 +00:00
christos 67cf388a2b print the types involved in the mismatch. 2008-04-26 19:38:30 +00:00
christos b965d925d7 - simplify logic in getting the filename index.
- fix an allocation botch.
2008-04-26 17:11:52 +00:00
christos fec2a3517e fix "long double" type recognition which broke with the complex changes. 2008-04-26 16:14:23 +00:00
christos e92259d4ee handle lintlibrary output of _Complex types. 2008-04-25 22:22:28 +00:00
christos 69ade9fd6e preliminary _Complex support.
NB: Does not really understand type conversions between complex and doubles.
2008-04-25 22:18:34 +00:00
christos 5f562aba67 handle case C1 ... C2: 2008-04-25 17:18:24 +00:00
dholland e93a5674cc Add a little const. 2008-03-30 22:28:41 +00:00
christos a23f0e5f81 PR/38142: YAMAMOTO Takashi: lint -S complains on variable length arrays 2008-03-04 02:41:46 +00:00
lukem cd2d88332f Don't bring in -lutil for tools. 2008-01-11 00:38:10 +00:00
simonb ccab3b34ce Remove support for NetBSD/pc532. 2008-01-10 13:40:36 +00:00
lukem d7382668ef Convert to using raise_default_signal(3). 2008-01-10 05:15:07 +00:00