Commit Graph

41 Commits

Author SHA1 Message Date
christos
b6b0a28bae use asprintf(). 2020-02-10 04:54:01 +00:00
scole
4c8f1ccfba PR toolchain/53710
allow 64bit target to compile on 32bit host

Ok'ed by <christos>
2018-11-16 20:49:08 +00:00
christos
a0e7897afd Disable __int128 checks if we are not building on a 64 bit host (
this is suboptimal, but it is the easiest way).
2018-10-07 14:20:01 +00:00
christos
0909701cc6 recognize int128 2018-09-07 15:16:15 +00:00
christos
c6347f3a1e add a type comparison function. 2016-08-19 10:18:11 +00:00
christos
20ba703761 make outname print where it came from in case of error 2014-04-17 18:52:03 +00:00
christos
d28b45a4f8 better to print (null) than core-dump 2012-06-20 18:50:11 +00:00
christos
52ec92ba25 more cross lint friendlyness
XXX: needs more constants converted double/float
2012-03-27 19:24:01 +00:00
christos
7f812cd511 Lukemify (WARNS=4) 2009-04-15 01:20:57 +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
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
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +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
dholland
e93a5674cc Add a little const. 2008-03-30 22:28:41 +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
skrll
683ccd8e40 Add RCSId. 2006-04-17 06:53:06 +00:00
skd
14834f0865 Deal with void * types. Approved by Christos. 2005-06-14 03:40:31 +00:00
christos
8b3f9b1455 Factor out tyname() so that it can be used both by lint1 and lint2.
Since type_t is different between lint1.h and lint2.h include the
appropriate file depending on the pass. Make the argument mismatch
error print the type names of the types involved. Now that we have
a tyname() function we can fix the rest of the pass2 warnings to be
more explanatory, but not now.
2005-04-07 16:28:40 +00:00
yamt
2e1baea952 recognize _Bool. 2004-09-12 08:58:52 +00:00
jmc
b2f782612f Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944
2004-06-20 22:20:14 +00:00
lukem
171d653219 Overhaul how `build.sh tools' are used:
*	Rename "config.h" to "nbtool_config.h" and
	HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
	This makes in more obvious in the source when we're using
	tools/compat/config.h versus "standard autoconf" config.h

    *	Consistently move the inclusion of nbtool_config.h to before
    	<sys/cdefs.h> so that the former can provide __RCSID() (et al),
    	and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
	#if HAVE_NBTOOL_CONFIG_H
	#include "nbtool_config.h"
	#endif
to the top of the source files (for the general case).
2003-10-27 00:12:41 +00:00
christos
2a2701085e - keep the fd to /dev/zero open
- take advantage of MAP_ANONYMOUS
2003-10-22 16:10:03 +00:00
christos
58507d43c3 PR/23219: Dan McMahill: Make this compile on system that don't have MAP_ANON.
Centralize the mmap allocations in a new function, xmapalloc() that handles
this.
2003-10-21 23:58:53 +00:00
itojun
d5250e4ec9 safer use of realloc 2003-10-16 06:34:19 +00:00
martin
c88a5e7be4 Lint is a host tool - leave the sparc64 hack in place if compiling with
an old compiler.
2003-09-21 17:06:40 +00:00
martin
cee04f319f No need to avoid long double on sparc64 any more. 2003-09-19 16:37:59 +00:00
christos
7d2c2eeaea - make all targparam.h files consistent with the arch includes
- add a new INTPTR_IS_LONG define and use it.

- XXX: the PTRDIFF, SIZEOF, INTPTR defines really make lint more relaxed
  in some platforms than others. We should really be looking for the
  particular tokens to enable this kind of checking. I.e.
  now:

	char *p;
	int foo = (int)p;

  does not produce a warning on INTPTR_IS_LONG == 0 platformas.
  In reality it should only elide the warning if:

	char *p;
	int foo = (intptr_t)p;

  but it is not that smart (yet).
2003-05-29 18:12:13 +00:00
simonb
f7ed8a7482 Move one group of #define's so this looks more like ilp32.h. 2003-05-21 12:09:39 +00:00
wiz
8a965ad2f1 Remove some __STDC__ tests. 2002-06-13 23:00:16 +00:00
tv
1d5b3f55ff Revert previous; <inttypes.h> is auto-generated-empty now. 2002-03-07 19:19:14 +00:00
tv
37ef6828bc Autoconf bracket #include <inttypes.h>. 2002-03-07 18:29:56 +00:00
thorpej
b6d2afdc45 Add constants that describe the target's max/min INT, UINT, LONG, ULONG,
QUAD, and UQUAD values.
2002-02-20 16:10:34 +00:00
thorpej
b02b24b1d7 Replace u_quad_t with uint64_t and quad_t with int64_t, and use
<inttypes.h> to get those type definitions.  These types are more
portable, and a little more sane to do autoconf tests for.
2002-02-05 03:04:26 +00:00
tv
9fbd88883c Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
  sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
2002-01-31 22:43:33 +00:00
tv
76834aef57 Protect __RCSID and __COPYRIGHT from being invoked if not defined. 2002-01-31 19:36:47 +00:00
thorpej
1e27695917 Define FLOAT_SIZE, DOUBLE_SIZE, LDOUBLE_SIZE, and ENUM_SIZE in
target-specific headers, and use the definitions when initializing
the type table.
2002-01-30 06:54:56 +00:00
tv
44fbde6015 Add hooks for compiling on non-NetBSD hosts. 2002-01-21 19:49:51 +00:00
thorpej
81a86a8f72 Centralize the initialization/declaration of the ttab. 2002-01-18 21:01:38 +00:00
thorpej
41d48940fa * Move stuff shared between lint1 and lint2 to the new common/ directory.
* Move the arch/ directory out of lint1/ into the top-level.
2002-01-18 20:39:17 +00:00