njoly
def73a1f81
c99: do not warn about trailing comma in enum declaration.
2011-12-19 16:52:27 +00:00
mbalmer
2790b28f0e
Fix typo in comment.
2011-10-17 16:31:14 +00:00
christos
c6a6b07331
Handle c99 declarations in the middle of blocks.
2011-10-04 16:19:59 +00:00
christos
0e4108c639
eat the last d in double constants.
2011-10-02 19:45:10 +00:00
njoly
7d41567535
Fix lseek(2) swapped arguments.
2011-09-18 09:07:35 +00:00
christos
bfb07aa1f2
Always use our own align macro and explain a bit more why this is bogus.
2011-06-24 01:10:31 +00:00
joerg
1e608ad53f
Fix format string usage
2011-05-24 12:49:11 +00:00
wiz
610b889888
Sort options and option descriptions. Use more markup.
2011-04-29 09:23:29 +00:00
christos
b9eac88297
weprovidedarracount()sothatwedon'tneedtosqueezethespacesout.
2011-02-07 23:56:18 +00:00
christos
ce3fa327b8
provide __arraycount() if not there.
2011-02-07 00:26:27 +00:00
pooka
f5d3a9ff38
don't use __arraycount in tools
2011-02-06 23:03:02 +00:00
christos
27eb1769a9
use unsigned char instead of uint8_t, easier for portability
2011-02-06 18:28:22 +00:00
christos
6b997b11db
better dependency handling
2011-02-05 19:13:48 +00:00
christos
4c07b5ae7d
fix missing comparison
2011-02-05 19:10:40 +00:00
christos
8e14f999b7
copyright date
2011-02-05 17:29:48 +00:00
christos
76706b0082
as promised make the last ops table auto-generated.
2011-02-05 17:14:14 +00:00
christos
6dfaa18130
oops forgot to commit the script.
2011-02-05 16:10:17 +00:00
christos
c93e02df25
fix tools build. Why doesn't .PARSEDIR work?
2011-02-05 03:09:46 +00:00
christos
759a394557
generate ops table dynamically. Will move the other table from tree.c there
...
too.
2011-02-04 23:32:44 +00:00
christos
15f35154fe
fix typo
2011-02-04 23:31:23 +00:00
matt
1d4bb1d8f6
Change mips64 to use a 16 byte long double.
2011-01-18 08:30:10 +00:00
christos
003dddff9d
PR/44235: Valeriy E. Ushakov: Don't pick up a block from the free list if
...
it is not big enough, allocate a new one. XXX: this is inefficient, but at
least it does not end up corrupting memory.
2011-01-17 03:04:10 +00:00
christos
c732e7b752
PR/44235: Martin Husemann: Fix core dump due to memory corruption.
...
Found by Henning Petersen
2010-12-18 20:57:41 +00:00
wiz
3d3c5d42cb
Observe the following spelling:
...
- wide character (noun)
- wide-character (adjective)
Inspired by jmc@OpenBSD.
2010-12-16 17:42:25 +00:00
christos
f6fb458da3
PR/44148: Henning Petersen: catstrg() does not set the resulting string length.
2010-11-24 17:51:11 +00:00
mrg
52a4f7ac75
remove the remaining non-ELF code.
2010-07-11 12:07:31 +00:00
mrg
4c92852a80
remove almost all the ability to build netbsd with an a.out target.
...
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.
this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.
i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.
some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
2010-07-06 05:59:50 +00:00
mrg
668cb96893
for mips64*, use mips64 subdir, otherwise use $MACHINE_ARCH if exists,
...
or $MACHINE_CPU. idea from dennis.c.ferguson@gmail.com in PR#43021.
2010-03-22 05:12:24 +00:00
mrg
4e60bef737
convert -idirafter to -isystem, as recommended by cgd in PR 11843.
...
most of the list in that PR were already done.
2010-03-22 01:29:29 +00:00
christos
9a10b49e97
revert for now.
2010-03-21 14:29:04 +00:00
christos
d867aaf024
make lint recognize constant shift values and not warn if the number of bits
...
shifted results in a narrower type.
2010-03-21 00:02:13 +00:00
wiz
8e35c759e7
Fix typo in comment.
2010-02-09 23:05:16 +00:00
christos
aa0d683311
Add a list of functions where we usually don't care about their return
...
code. Can be bypassed by -hh
2010-01-14 16:58:27 +00:00
christos
039ab08b25
fix hex double parsing.
2010-01-11 16:28:06 +00:00
matt
c31d577a8c
Merge from matt-nb5-mips64
...
Teach lint about mips64
2009-12-14 00:42:06 +00:00
christos
2853bbf4b7
use %option instead of #define YY_NO_...
2009-10-29 14:49:02 +00:00
christos
7770393bf8
add type attributes in a few more places.
2009-10-03 17:09:18 +00:00
christos
3da8ec1b81
accept struct { ... } __packed name;
2009-10-03 01:35:20 +00:00
christos
17b31cc3a2
handle bit fields in packed structures.
2009-10-02 21:49:30 +00:00
christos
876a5b04b7
compute sizes by the new tsize() function.
2009-10-02 21:04:03 +00:00
christos
19f30f4ea2
fix typedef struct __packed
2009-10-02 20:45:06 +00:00
christos
2144a69bda
remove debugging
2009-10-02 19:02:16 +00:00
christos
872e317461
recognize struct __packed x { }; in addition to struct x { } __packed;
2009-10-02 19:01:13 +00:00
christos
f07e30ff20
change initialization from non const of regular variables to c99 instead of
...
gnu since c99 now has it.
2009-10-02 18:17:16 +00:00
christos
bb531790dc
understand __attribute__((__packed__)) and __packed.
2009-10-02 15:03:45 +00:00
wiz
8356afb2c1
Fix typos in comment.
2009-08-05 19:08:28 +00:00
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
uwe
17bb5b2554
tlst[inptype(...)] is bad C code because inptype() can realloc tlst
...
and there's no intermediate sequence point! We actually hit this on
sh3 with -O2 where gcc4 caches tlst in a register prior to recursive
call to inptype() and if you are unlucky the recursive call needs to
realloc tlst.
Introduce a temp variable to force a sequence point.
2007-09-28 21:53:50 +00:00
scw
5764a76889
Remove support for NetBSD/{,evb}sh5.
2007-04-08 09:35:21 +00:00
hubertf
6df5e55489
Remove unused ctype.h header.
...
Contributed by Slava Semushin <slava.semushin@gmail.com> in private mail.
2007-02-07 14:20:58 +00:00
he
3da5bad40a
Add a cheesy workaround marked XXX for the situation where the
...
strtod() implementation available in the environment does not
handle hex floats.
Discussed with and suggested by christos
2007-02-06 00:08:31 +00:00