plan9fox/sys/src/cmd/cc
Ori Bernstein 3df95385bc fix special case for null pointer constants in cond expressions
Section 6.5.15 of the C99 spec requires that if
	one argument of a ?: expression is a null pointer
	constant, and the other has a pointer type T*, then
	the type of the expression is T*.

	We were attempting to follow this rule, however,
	we only handled literal expressions when checking
	for null pointers.

	This change looks through casts, so 'nil' and 'NULL',
	and their expansion '(void*)0' are all detected as
	null pointer constants.
2020-02-27 15:09:10 -05:00
..
acid.c cc: emit right acid format for address 2014-02-10 23:10:47 +01:00
bits.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
c99 Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
cc.h fix special case for null pointer constants in cond expressions 2020-02-27 15:09:10 -05:00
cc.y fix utf and rune handling in preparation for 32bit runes 2012-12-31 21:09:46 +01:00
com.c fix special case for null pointer constants in cond expressions 2020-02-27 15:09:10 -05:00
com64.c cc: handle 64 bit mixedmode asop and type vlong <-> float/double type conversions 2015-10-04 20:06:30 +02:00
compat Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
compat.c cc: provide fake realloc() for getenv() 2015-07-28 12:06:29 +02:00
dcl.c Allow address expressions in ?c after int casts. 2019-09-07 18:25:04 -07:00
dpchk.c introduce signed intptr and %z format modifier for formating uintptr and intptr 2016-01-07 04:39:09 +01:00
funct.c cc: correct out-of-bounds references in funct.c (thanks charles forsyth) 2014-03-02 21:08:48 +01:00
lex.c cc: use 7 octal digits for 21 bit runes 2019-08-12 19:15:02 +02:00
lexbody ?a: getc() needs to increment lineno if it gets \n from peekc 2017-05-26 00:01:53 +00:00
mac.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
macbody cc: use UTFmax not 4 (djc) 2016-05-16 22:02:17 +02:00
mkfile Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
omachcap.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
pgen.c import updated compilers from sources 2012-07-30 19:11:16 +02:00
pickle.c cc: include $builtin as keywoard in pickle() (from charles forsyth) 2015-10-06 06:47:55 +02:00
pswt.c fix utf and rune handling in preparation for 32bit runes 2012-12-31 21:09:46 +01:00
scon.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
sub.c fix special case for null pointer constants in cond expressions 2020-02-27 15:09:10 -05:00