Commit graph

14 commits

Author SHA1 Message Date
George Koehler
36f16b0cb8 Cut down some clang warnings
Edit C code to reduce warnings from clang.  Most warnings are for
implicit declarations of functions, but some warnings want me to add
parentheses or curly braces, or to cast arguments for printf().

Make a few other changes, like declaring float_cst() in h/con_float to
be static, and using C99 bool in ego/ra/makeitems.c and
ego/share/makecldef.c.  Such changes don't silence warnings; I make
such changes while I silence warnings in the same file.  In
float_cst(), rename parameter `str` to `float_str`, so it doesn't
share a name with the global variable `str`.

Remove `const` from `newmodule(const char *)` in mach/proto/as to
silence a warning.  I wrongly added the `const` in d347207.

For warnings about implicit declarations of functions, the fix is to
declare the function before calling it.  For example, my OpenBSD
system needs <sys/wait.h> to declare wait().

In util/int, add "whatever.h" to declare more functions.  Remove old
declarations from "mem.h", to prefer the newer declarations of the
same functions in "data.h" and "stack.h".
2019-10-30 18:36:38 -04:00
carl
21e15965cc ANSI C conversion and add procedure declarations. 2019-05-11 01:17:40 +08:00
George Koehler
cb8b28c088 For DIAGOPT, change outshort(patno) to outshort(lino - 1).
This is more useful when looking for patterns; lino - 1 is probably
the line number in the patterns file.  DIAGOPT is off by default but
one can edit optim.h to enable it.

The other changes just clean up whitespace.
2017-10-29 14:18:47 -04:00
David Given
98ea849d03 Improve flex correctness. 2015-03-23 00:09:27 +01:00
David Given
c1aca7dae5 First milestone of replacing the build system.
--HG--
branch : dtrg-buildsystem
rename : lang/cem/cpp.ansi/Parameters => lang/cem/cpp.ansi/parameters.h
2013-05-12 20:45:55 +01:00
dtrg
345f4c8978 Modified to avoid creating a zero-length iargs array, which some compilers
(OSX) do not create a symbol for.
2006-07-23 18:29:38 +00:00
dtrg
35f2f8b043 Rationalised use of #includes to be more standards-compliant. 2006-07-20 23:04:15 +00:00
ceriel
5c83e7dbb5 Header --> Id 1994-06-24 11:31:16 +00:00
ceriel
01f77a03af Added CBO (commutative binary operator) to make it a little easier to
write reordering patterns
1989-10-20 11:59:52 +00:00
ceriel
41d0500d81 replaced relative includes by <> includes 1988-09-12 09:13:49 +00:00
ceriel
6c812387fd Added copyright notice 1987-03-10 01:42:07 +00:00
sater
822b1c557c Revised to include rcsid of pattern file in binary opt 1984-08-16 16:08:39 +00:00
sater
3c197c150a added rcsid 1984-05-17 14:14:29 +00:00
sater
ac23d5c871 Initial revision 1984-05-17 13:42:36 +00:00