resolve merge conflictsdiff -r1.3 -r1.4 src/external/bsd/pcc/dist/pcc/configure.ac
(plunky)
--- src/external/bsd/pcc/dist/pcc/configure.ac 2011/09/01 12:55:29 1.3
+++ src/external/bsd/pcc/dist/pcc/configure.ac 2012/01/11 20:46:47 1.4
@@ -60,26 +60,27 @@ case "$target_os" in | @@ -60,26 +60,27 @@ case "$target_os" in | |||
60 | stabs=yes | 60 | stabs=yes | |
61 | tls=yes | 61 | tls=yes | |
62 | case "$target_cpu" in | 62 | case "$target_cpu" in | |
63 | i?86) targmach=i386 ;; | 63 | i?86) targmach=i386 ;; | |
64 | x86_64) targmach=amd64 ;; | 64 | x86_64) targmach=amd64 ;; | |
65 | esac | 65 | esac | |
66 | ;; | 66 | ;; | |
67 | 67 | |||
68 | freebsd*) | 68 | freebsd*) | |
69 | targos=freebsd | 69 | targos=freebsd | |
70 | abi=elf | 70 | abi=elf | |
71 | stabs=yes | 71 | stabs=yes | |
72 | case "$target_os" in | 72 | case "$target_os" in | |
73 | *10.*) targosver=10 ;; | |||
73 | *9.*) targosver=9 ;; | 74 | *9.*) targosver=9 ;; | |
74 | *8.*) targosver=8 ;; | 75 | *8.*) targosver=8 ;; | |
75 | *7.*) targosver=7 ;; | 76 | *7.*) targosver=7 ;; | |
76 | *6.*) targosver=6 ;; | 77 | *6.*) targosver=6 ;; | |
77 | *5.*) targosver=5 ;; | 78 | *5.*) targosver=5 ;; | |
78 | *4.*) targosver=4 ;; | 79 | *4.*) targosver=4 ;; | |
79 | esac | 80 | esac | |
80 | case "$target_cpu" in | 81 | case "$target_cpu" in | |
81 | i386) targmach=i386 ;; | 82 | i386) targmach=i386 ;; | |
82 | x86_64) targmach=amd64 ;; | 83 | x86_64) targmach=amd64 ;; | |
83 | esac | 84 | esac | |
84 | ;; | 85 | ;; | |
85 | 86 | |||
@@ -490,26 +491,27 @@ pcc_minor=`echo $PACKAGE_VERSION | awk - | @@ -490,26 +491,27 @@ pcc_minor=`echo $PACKAGE_VERSION | awk - | |||
490 | pcc_minorminor=`echo $PACKAGE_VERSION | awk -F. '{print $3}'` | 491 | pcc_minorminor=`echo $PACKAGE_VERSION | awk -F. '{print $3}'` | |
491 | versstr="\"$PACKAGE_STRING `cat $srcdir/DATESTAMP` for $target\"" | 492 | versstr="\"$PACKAGE_STRING `cat $srcdir/DATESTAMP` for $target\"" | |
492 | 493 | |||
493 | AC_DEFINE_UNQUOTED(PCC_MAJOR, $pcc_major, [Major version no]) | 494 | AC_DEFINE_UNQUOTED(PCC_MAJOR, $pcc_major, [Major version no]) | |
494 | AC_DEFINE_UNQUOTED(PCC_MINOR, $pcc_minor, [Minor version no]) | 495 | AC_DEFINE_UNQUOTED(PCC_MINOR, $pcc_minor, [Minor version no]) | |
495 | AC_DEFINE_UNQUOTED(PCC_MINORMINOR, $pcc_minorminor, [Minor minor version no]) | 496 | AC_DEFINE_UNQUOTED(PCC_MINORMINOR, $pcc_minorminor, [Minor minor version no]) | |
496 | AC_DEFINE_UNQUOTED(VERSSTR, $versstr, [Version string]) | 497 | AC_DEFINE_UNQUOTED(VERSSTR, $versstr, [Version string]) | |
497 | 498 | |||
498 | AC_CONFIG_FILES([Makefile | 499 | AC_CONFIG_FILES([Makefile | |
499 | cc/Makefile | 500 | cc/Makefile | |
500 | cc/cc/Makefile | 501 | cc/cc/Makefile | |
501 | cc/cpp/Makefile | 502 | cc/cpp/Makefile | |
502 | cc/ccom/Makefile | 503 | cc/ccom/Makefile | |
504 | cc/cxxcom/Makefile | |||
503 | cc/driver/Makefile | 505 | cc/driver/Makefile | |
504 | f77/Makefile | 506 | f77/Makefile | |
505 | f77/f77/Makefile | 507 | f77/f77/Makefile | |
506 | f77/fcom/Makefile | 508 | f77/fcom/Makefile | |
507 | ]) | 509 | ]) | |
508 | AC_OUTPUT | 510 | AC_OUTPUT | |
509 | 511 | |||
510 | eval "exec_prefix=$exec_prefix" | 512 | eval "exec_prefix=$exec_prefix" | |
511 | eval "bindir=$bindir" | 513 | eval "bindir=$bindir" | |
512 | eval "libexecdir=$libexecdir" | 514 | eval "libexecdir=$libexecdir" | |
513 | 515 | |||
514 | echo | 516 | echo | |
515 | echo "Target CPU is .................... ${targmach}" | 517 | echo "Target CPU is .................... ${targmach}" |
--- src/external/bsd/pcc/dist/pcc/cc/Makefile.in 2011/09/01 12:55:29 1.4
+++ src/external/bsd/pcc/dist/pcc/cc/Makefile.in 2012/01/11 20:46:47 1.5
@@ -1,22 +1,22 @@ | @@ -1,22 +1,22 @@ | |||
1 | # Id: Makefile.in,v 1.8 2011/06/07 13:56:05 plunky Exp | 1 | # Id: Makefile.in,v 1.9 2012/01/01 16:27:25 ragge Exp | |
2 | # $NetBSD: Makefile.in,v 1.4 2011/09/01 12:55:29 plunky Exp $ | 2 | # $NetBSD: Makefile.in,v 1.5 2012/01/11 20:46:47 plunky Exp $ | |
3 | # | 3 | # | |
4 | # Makefile.in for top-level of pcc. | 4 | # Makefile.in for top-level of pcc. | |
5 | # | 5 | # | |
6 | 6 | |||
7 | @SET_MAKE@ | 7 | @SET_MAKE@ | |
8 | 8 | |||
9 | ALL_SUBDIRS= cc cpp ccom | 9 | ALL_SUBDIRS= cc cpp ccom cxxcom | |
10 | DIST_SUBDIRS= $(ALL_SUBDIRS) driver | 10 | DIST_SUBDIRS= $(ALL_SUBDIRS) driver | |
11 | 11 | |||
12 | all install clean: | 12 | all install clean: | |
13 | @for subdir in $(ALL_SUBDIRS); do \ | 13 | @for subdir in $(ALL_SUBDIRS); do \ | |
14 | _nextdir_=$${_thisdir_+$$_thisdir_/}$$subdir; \ | 14 | _nextdir_=$${_thisdir_+$$_thisdir_/}$$subdir; \ | |
15 | echo "===> $$_nextdir_"; \ | 15 | echo "===> $$_nextdir_"; \ | |
16 | (_thisdir_=$$_nextdir_; export _thisdir_; cd $$subdir && \ | 16 | (_thisdir_=$$_nextdir_; export _thisdir_; cd $$subdir && \ | |
17 | exec $(MAKE) $(MFLAGS) $@) || exit $$?; \ | 17 | exec $(MAKE) $(MFLAGS) $@) || exit $$?; \ | |
18 | echo "<=== $$_nextdir_"; \ | 18 | echo "<=== $$_nextdir_"; \ | |
19 | done | 19 | done | |
20 | 20 | |||
21 | distclean: | 21 | distclean: | |
22 | @for subdir in $(DIST_SUBDIRS); do \ | 22 | @for subdir in $(DIST_SUBDIRS); do \ |
--- src/external/bsd/pcc/dist/pcc/cc/cc/cc.1 2011/09/01 12:55:29 1.4
+++ src/external/bsd/pcc/dist/pcc/cc/cc/cc.1 2012/01/11 20:46:47 1.5
@@ -1,60 +1,62 @@ | @@ -1,60 +1,62 @@ | |||
1 | .\" Id: cc.1,v 1.33 2011/08/28 11:57:45 plunky Exp | 1 | .\" Id: cc.1,v 1.36 2011/11/11 09:13:14 plunky Exp | |
2 | .\" $NetBSD: cc.1,v 1.4 2011/09/01 12:55:29 plunky Exp $ | 2 | .\" $NetBSD: cc.1,v 1.5 2012/01/11 20:46:47 plunky Exp $ | |
3 | .\" | 3 | .\" | |
4 | .\" Copyright (c) 2007 Jeremy C. Reed <reed@reedmedia.net> | 4 | .\" Copyright (c) 2007 Jeremy C. Reed <reed@reedmedia.net> | |
5 | .\" | 5 | .\" | |
6 | .\" Permission to use, copy, modify, and/or distribute this software for any | 6 | .\" Permission to use, copy, modify, and/or distribute this software for any | |
7 | .\" purpose with or without fee is hereby granted, provided that the above | 7 | .\" purpose with or without fee is hereby granted, provided that the above | |
8 | .\" copyright notice and this permission notice appear in all copies. | 8 | .\" copyright notice and this permission notice appear in all copies. | |
9 | .\" | 9 | .\" | |
10 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR AND CONTRIBUTORS DISCLAIM | 10 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR AND CONTRIBUTORS DISCLAIM | |
11 | .\" ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED | 11 | .\" ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED | |
12 | .\" WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL AUTHOR AND | 12 | .\" WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL AUTHOR AND | |
13 | .\" CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL | 13 | .\" CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL | |
14 | .\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR | 14 | .\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR | |
15 | .\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS | 15 | .\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS | |
16 | .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF | 16 | .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF | |
17 | .\" THIS SOFTWARE. | 17 | .\" THIS SOFTWARE. | |
18 | .\" | 18 | .\" | |
19 | .Dd September 14, 2007 | 19 | .Dd November 11, 2011 | |
20 | .Dt CC 1 | 20 | .Dt CC 1 | |
21 | .Os | 21 | .Os | |
22 | .Sh NAME | 22 | .Sh NAME | |
23 | .Nm cc | 23 | .Nm cc | |
24 | .Nd front-end to the C compiler | 24 | .Nd front-end to the C compiler | |
25 | .Sh SYNOPSIS | 25 | .Sh SYNOPSIS | |
26 | .Nm | 26 | .Nm | |
27 | .Op Fl cEgkLMPStvX | 27 | .Op Fl cEgkLMPStvX | |
28 | .Op Fl B Ns Ar prefix | 28 | .Op Fl B Ns Ar prefix | |
29 | .Op Fl D Ar macro Ns Oo = Ns Ar value Oc | 29 | .Op Fl D Ar macro Ns Oo = Ns Ar value Oc | |
30 | .Op Fl fPIC | 30 | .Op Fl f Ns Ar feature | |
31 | .Op Fl fpic | |||
32 | .Op Fl I Ar path | 31 | .Op Fl I Ar path | |
33 | .Op Fl include Ar file | 32 | .Op Fl include Ar file | |
34 | .Op Fl isystem Ar path | 33 | .Op Fl isystem Ar path | |
35 | .Op Fl m Ns Ar option | 34 | .Op Fl m Ns Ar option | |
36 | .Op Fl nodefaultlibs | 35 | .Op Fl nodefaultlibs | |
37 | .Op Fl nostartfiles | 36 | .Op Fl nostartfiles | |
38 | .Op Fl nostdinc | 37 | .Op Fl nostdinc | |
39 | .Op Fl nostdlib | 38 | .Op Fl nostdlib | |
40 | .Op Fl O Ns Oo Ar level Oc | 39 | .Op Fl O Ns Oo Ar level Oc | |
41 | .Op Fl o Ar outfile | 40 | .Op Fl o Ar outfile | |
42 | .Op Fl pg | 41 | .Op Fl pg | |
43 | .Op Fl pthread | 42 | .Op Fl pthread | |
44 | .Op Fl shared | 43 | .Op Fl shared | |
45 | .Op Fl static | 44 | .Op Fl static | |
46 | .Op Fl U Ar macro | 45 | .Op Fl U Ar macro | |
47 | .Op Fl Wl Ar flags | 46 | .Op Fl Wa Ns , Ns Ar options | |
47 | .Op Fl Wc Ns , Ns Ar options | |||
48 | .Op Fl Wl Ns , Ns Ar options | |||
49 | .Op Fl Wp Ns , Ns Ar options | |||
48 | .Op Fl x Ar language | 50 | .Op Fl x Ar language | |
49 | .Op Ar | 51 | .Op Ar | |
50 | .Sh DESCRIPTION | 52 | .Sh DESCRIPTION | |
51 | The | 53 | The | |
52 | .Nm | 54 | .Nm | |
53 | utility provides a front-end to the | 55 | utility provides a front-end to the | |
54 | .Dq portable C compiler . | 56 | .Dq portable C compiler . | |
55 | Multiple files may be given on the command line. | 57 | Multiple files may be given on the command line. | |
56 | Unrecognized options are all sent directly to | 58 | Unrecognized options are all sent directly to | |
57 | .Xr ld 1 . | 59 | .Xr ld 1 . | |
58 | .Pp | 60 | .Pp | |
59 | .\" Brief description of its syntax: | 61 | .\" Brief description of its syntax: | |
60 | Filenames that end with | 62 | Filenames that end with | |
@@ -131,26 +133,28 @@ if multiple files are given. | @@ -131,26 +133,28 @@ if multiple files are given. | |||
131 | Passed to the | 133 | Passed to the | |
132 | .Xr cpp 1 | 134 | .Xr cpp 1 | |
133 | preprocessor to define | 135 | preprocessor to define | |
134 | .Ar macro | 136 | .Ar macro | |
135 | with an optional | 137 | with an optional | |
136 | .Ar value . | 138 | .Ar value . | |
137 | .It Fl E | 139 | .It Fl E | |
138 | Stop after preprocessing with | 140 | Stop after preprocessing with | |
139 | .Xr cpp 1 . | 141 | .Xr cpp 1 . | |
140 | Do not compile, assemble, or link. | 142 | Do not compile, assemble, or link. | |
141 | Output is sent to standard output unless the | 143 | Output is sent to standard output unless the | |
142 | .Fl o | 144 | .Fl o | |
143 | option is used. | 145 | option is used. | |
146 | .It Fl ffreestanding | |||
147 | Assume a freestanding environment. | |||
144 | .It Fl fPIC | 148 | .It Fl fPIC | |
145 | Generate PIC code. | 149 | Generate PIC code. | |
146 | .\" TODO: document about avoiding machine-specific maximum size? | 150 | .\" TODO: document about avoiding machine-specific maximum size? | |
147 | .It Fl fpic | 151 | .It Fl fpic | |
148 | Tells C compiler to generate PIC code | 152 | Tells C compiler to generate PIC code | |
149 | and tells assembler that PIC code has been generated. | 153 | and tells assembler that PIC code has been generated. | |
150 | .\" TODO: document difference between PIC and pic | 154 | .\" TODO: document difference between PIC and pic | |
151 | .\" other -f GCC compatibility flags are ignored for now | 155 | .\" other -f GCC compatibility flags are ignored for now | |
152 | .It Fl g | 156 | .It Fl g | |
153 | Send | 157 | Send | |
154 | .Fl g | 158 | .Fl g | |
155 | flag to | 159 | flag to | |
156 | .Xr ccom 1 | 160 | .Xr ccom 1 | |
@@ -271,29 +275,34 @@ and/or shared objects for the platform. | @@ -271,29 +275,34 @@ and/or shared objects for the platform. | |||
271 | .It Fl t | 275 | .It Fl t | |
272 | Passed to | 276 | Passed to | |
273 | .Xr cpp 1 | 277 | .Xr cpp 1 | |
274 | to suppress some default macro definitions and enable use | 278 | to suppress some default macro definitions and enable use | |
275 | of traditional C preprocessor syntax. | 279 | of traditional C preprocessor syntax. | |
276 | .It Fl U Ar macro | 280 | .It Fl U Ar macro | |
277 | Passes to the | 281 | Passes to the | |
278 | .Xr cpp 1 | 282 | .Xr cpp 1 | |
279 | preprocessor to remove the initial macro definition. | 283 | preprocessor to remove the initial macro definition. | |
280 | .It Fl v | 284 | .It Fl v | |
281 | Outputs the version of | 285 | Outputs the version of | |
282 | .Nm | 286 | .Nm | |
283 | and shows what commands will be run with their command line arguments. | 287 | and shows what commands will be run with their command line arguments. | |
284 | .It Fl Wl Ar flags | 288 | .It Fl Wa Ns , Ns Ar options | |
285 | Options for the linker. | 289 | Comma separated list of options for the assembler. | |
286 | .\" what is ignored? llist? | 290 | .It Fl Wc Ns , Ns Ar options | |
291 | Comma separated list of options for the compiler. | |||
292 | .It Fl Wl Ns , Ns Ar options | |||
293 | Comma separated list of options for the linker. | |||
294 | .It Fl Wp Ns , Ns Ar options | |||
295 | Comma separated list of options for the preprocessor. | |||
287 | .It Fl X | 296 | .It Fl X | |
288 | Don't remove temporary files on exit. | 297 | Don't remove temporary files on exit. | |
289 | .It Fl x Ar language | 298 | .It Fl x Ar language | |
290 | GCC compatibility option; specify the language in use rather than | 299 | GCC compatibility option; specify the language in use rather than | |
291 | interpreting the filename extension. | 300 | interpreting the filename extension. | |
292 | Currently known language values are | 301 | Currently known language values are | |
293 | .Sy c , | 302 | .Sy c , | |
294 | .Sy c++ | 303 | .Sy c++ | |
295 | and | 304 | and | |
296 | .Sy assembler-with-cpp . | 305 | .Sy assembler-with-cpp . | |
297 | Any unknown | 306 | Any unknown | |
298 | .Fl x | 307 | .Fl x | |
299 | options are passed to | 308 | options are passed to |
--- src/external/bsd/pcc/dist/pcc/cc/ccom/ccom.1 2011/09/01 12:55:29 1.4
+++ src/external/bsd/pcc/dist/pcc/cc/ccom/ccom.1 2012/01/11 20:46:48 1.5
@@ -1,31 +1,32 @@ | @@ -1,31 +1,32 @@ | |||
1 | .\" Id: ccom.1,v 1.23 2011/08/31 18:02:24 plunky Exp | 1 | .\" Id: ccom.1,v 1.24 2011/11/14 16:46:17 plunky Exp | |
2 | .\" $NetBSD: ccom.1,v 1.4 2011/09/01 12:55:29 plunky Exp $ | 2 | .\" $NetBSD: ccom.1,v 1.5 2012/01/11 20:46:48 plunky Exp $ | |
3 | .\" | 3 | .\" | |
4 | .\" Copyright (c) 2007 Jeremy C. Reed <reed@reedmedia.net> | 4 | .\" Copyright (c) 2007 Jeremy C. Reed <reed@reedmedia.net> | |
5 | .\" | |||
5 | .\" Permission to use, copy, modify, and/or distribute this software for any | 6 | .\" Permission to use, copy, modify, and/or distribute this software for any | |
6 | .\" purpose with or without fee is hereby granted, provided that the above | 7 | .\" purpose with or without fee is hereby granted, provided that the above | |
7 | .\" copyright notice and this permission notice appear in all copies. | 8 | .\" copyright notice and this permission notice appear in all copies. | |
8 | .\" | 9 | .\" | |
9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR AND CONTRIBUTORS DISCLAIM | 10 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR AND CONTRIBUTORS DISCLAIM | |
10 | .\" ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED | 11 | .\" ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED | |
11 | .\" WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL AUTHOR AND | 12 | .\" WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL AUTHOR AND | |
12 | .\" CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL | 13 | .\" CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL | |
13 | .\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR | 14 | .\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR | |
14 | .\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS | 15 | .\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS | |
15 | .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF | 16 | .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF | |
16 | .\" THIS SOFTWARE. | 17 | .\" THIS SOFTWARE. | |
17 | .\" | 18 | .\" | |
18 | .Dd August 28, 2011 | 19 | .Dd November 14, 2011 | |
19 | .Dt CCOM 1 | 20 | .Dt CCOM 1 | |
20 | .Os | 21 | .Os | |
21 | .Sh NAME | 22 | .Sh NAME | |
22 | .Nm ccom | 23 | .Nm ccom | |
23 | .Nd C compiler | 24 | .Nd C compiler | |
24 | .Sh SYNOPSIS | 25 | .Sh SYNOPSIS | |
25 | .Nm | 26 | .Nm | |
26 | .Op Fl gkpsv | 27 | .Op Fl gkpsv | |
27 | .Op Fl f Ar features | 28 | .Op Fl f Ar features | |
28 | .Op Fl m Ar options | 29 | .Op Fl m Ar options | |
29 | .Op Fl W Ar warnings | 30 | .Op Fl W Ar warnings | |
30 | .Op Fl X Ar flags | 31 | .Op Fl X Ar flags | |
31 | .Op Fl x Ar settings | 32 | .Op Fl x Ar settings | |
@@ -133,49 +134,56 @@ This includes: | @@ -133,49 +134,56 @@ This includes: | |||
133 | name table entries, name string size, permanent allocated memory, | 134 | name table entries, name string size, permanent allocated memory, | |
134 | temporary allocated memory, lost memory, argument list unions, | 135 | temporary allocated memory, lost memory, argument list unions, | |
135 | dimension/function unions, struct/union/enum blocks, inline node count, | 136 | dimension/function unions, struct/union/enum blocks, inline node count, | |
136 | inline control blocks, and permanent symtab entries. | 137 | inline control blocks, and permanent symtab entries. | |
137 | .\" TODO: explain units for above? | 138 | .\" TODO: explain units for above? | |
138 | .It Fl v | 139 | .It Fl v | |
139 | Display version. | 140 | Display version. | |
140 | .It Fl W Ar warning | 141 | .It Fl W Ar warning | |
141 | Do some basic checks and emit warnings about possible coding problems. | 142 | Do some basic checks and emit warnings about possible coding problems. | |
142 | Multiple | 143 | Multiple | |
143 | .Fl W | 144 | .Fl W | |
144 | options can be given, the following warnings are supported: | 145 | options can be given, the following warnings are supported: | |
145 | .Bl -tag -width Ds | 146 | .Bl -tag -width Ds | |
146 | .It Sy error | 147 | .It Sy error Ns Oo = Ns Ar warning Oc | |
147 | Treat all warnings as errors. | 148 | Enable | |
149 | .Ar warning , | |||
150 | and treat it as an error condition. | |||
151 | If a specific warning is not given, producing any warning will cause an error. | |||
148 | .It Sy implicit-function-declaration | 152 | .It Sy implicit-function-declaration | |
149 | (TODO) Require explicit prototypes for all called functions. | 153 | (TODO) Require explicit prototypes for all called functions. | |
150 | .It Sy implicit-int | 154 | .It Sy implicit-int | |
151 | (TODO) Warn when a function declaration lacks a type. | 155 | (TODO) Warn when a function declaration lacks a type. | |
152 | .It Sy missing-prototypes | 156 | .It Sy missing-prototypes | |
153 | Require explicit prototypes for all global function definitions. | 157 | Require explicit prototypes for all global function definitions. | |
154 | .It Sy pointer-sign | 158 | .It Sy pointer-sign | |
155 | Warn when pointer operations are done with mismatched signed and unsigned values. | 159 | Warn when pointer operations are done with mismatched signed and unsigned values. | |
156 | .It Sy sign-compare | 160 | .It Sy sign-compare | |
157 | (TODO) Warn about comparisons between signed and unsigned values. | 161 | (TODO) Warn about comparisons between signed and unsigned values. | |
158 | .It Sy strict-prototypes | 162 | .It Sy strict-prototypes | |
159 | (TODO) Require that function prototypes are strictly C99. | 163 | (TODO) Require that function prototypes are strictly C99. | |
160 | .It Sy shadow | 164 | .It Sy shadow | |
161 | Report when a local variable shadows something from a higher scope. | 165 | Report when a local variable shadows something from a higher scope. | |
162 | .It Sy truncate | 166 | .It Sy truncate | |
163 | Report when integer values may be implicitly truncated to fit a smaller type. | 167 | Report when integer values may be implicitly truncated to fit a smaller type. | |
164 | .It Sy unknown-pragmas | 168 | .It Sy unknown-pragmas | |
165 | Report unhandled pragma statements. | 169 | Report unhandled pragma statements. | |
166 | .It Sy unreachable-code | 170 | .It Sy unreachable-code | |
167 | Report statements that cannot be executed. | 171 | Report statements that cannot be executed. | |
168 | .El | 172 | .El | |
173 | .Pp | |||
174 | Any of the above may be prefixed with | |||
175 | .Dq no- | |||
176 | in order to disable the effect. | |||
169 | .\" | 177 | .\" | |
170 | .It Fl X Ar flags | 178 | .It Fl X Ar flags | |
171 | C specific debugging where | 179 | C specific debugging where | |
172 | .Ar flags | 180 | .Ar flags | |
173 | is one or more of the following: | 181 | is one or more of the following: | |
174 | .Pp | 182 | .Pp | |
175 | .Bl -tag -compact -width Ds | 183 | .Bl -tag -compact -width Ds | |
176 | .It Sy b | 184 | .It Sy b | |
177 | Building of parse trees | 185 | Building of parse trees | |
178 | .It Sy d | 186 | .It Sy d | |
179 | Declarations (using multiple | 187 | Declarations (using multiple | |
180 | .Sy d | 188 | .Sy d | |
181 | flags gives more output) | 189 | flags gives more output) |
--- src/external/bsd/pcc/dist/pcc/cc/ccom/scan.l 2011/09/01 12:55:29 1.3
+++ src/external/bsd/pcc/dist/pcc/cc/ccom/scan.l 2012/01/11 20:46:48 1.4
@@ -1,16 +1,16 @@ | @@ -1,16 +1,16 @@ | |||
1 | %{ | 1 | %{ | |
2 | /* Id: scan.l,v 1.108 2011/06/07 12:43:36 plunky Exp */ | 2 | /* Id: scan.l,v 1.109 2011/09/03 08:04:18 ragge Exp */ | |
3 | /* $NetBSD: scan.l,v 1.3 2011/09/01 12:55:29 plunky Exp $ */ | 3 | /* $NetBSD: scan.l,v 1.4 2012/01/11 20:46:48 plunky Exp $ */ | |
4 | 4 | |||
5 | /* | 5 | /* | |
6 | * Copyright (c) 2002 Anders Magnusson. All rights reserved. | 6 | * Copyright (c) 2002 Anders Magnusson. All rights reserved. | |
7 | * | 7 | * | |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without | |
9 | * modification, are permitted provided that the following conditions | 9 | * modification, are permitted provided that the following conditions | |
10 | * are met: | 10 | * are met: | |
11 | * 1. Redistributions of source code must retain the above copyright | 11 | * 1. Redistributions of source code must retain the above copyright | |
12 | * notice, this list of conditions and the following disclaimer. | 12 | * notice, this list of conditions and the following disclaimer. | |
13 | * 2. Redistributions in binary form must reproduce the above copyright | 13 | * 2. Redistributions in binary form must reproduce the above copyright | |
14 | * notice, this list of conditions and the following disclaimer in the | 14 | * notice, this list of conditions and the following disclaimer in the | |
15 | * documentation and/or other materials provided with the distribution. | 15 | * documentation and/or other materials provided with the distribution. | |
16 | * 3. The name of the author may not be used to endorse or promote products | 16 | * 3. The name of the author may not be used to endorse or promote products | |
@@ -44,27 +44,27 @@ UL ({L}|\\u{H}{H}{H}{H}|\\U{H}{H}{H}{H | @@ -44,27 +44,27 @@ UL ({L}|\\u{H}{H}{H}{H}|\\U{H}{H}{H}{H | |||
44 | #include <errno.h> | 44 | #include <errno.h> | |
45 | #include <string.h> | 45 | #include <string.h> | |
46 | #include <stdarg.h> | 46 | #include <stdarg.h> | |
47 | #include <ctype.h> | 47 | #include <ctype.h> | |
48 | 48 | |||
49 | #include "pass1.h" | 49 | #include "pass1.h" | |
50 | #include "cgram.h" | 50 | #include "cgram.h" | |
51 | 51 | |||
52 | static NODE *cvtdig(int radix); | 52 | static NODE *cvtdig(int radix); | |
53 | static NODE *charcon(void); | 53 | static NODE *charcon(void); | |
54 | static NODE *wcharcon(void); | 54 | static NODE *wcharcon(void); | |
55 | static void control(int); | 55 | static void control(int); | |
56 | static void pragma(void); | 56 | static void pragma(void); | |
57 | int notype, parbal, inattr, parlvl, nodinit; | 57 | int notype, parbal, inattr, parlvl, nodinit, inoso; | |
58 | static int resw(TWORD, int); | 58 | static int resw(TWORD, int); | |
59 | 59 | |||
60 | #define CPP_IDENT 2 | 60 | #define CPP_IDENT 2 | |
61 | #define CPP_LINE 3 | 61 | #define CPP_LINE 3 | |
62 | #define CPP_HASH 4 | 62 | #define CPP_HASH 4 | |
63 | 63 | |||
64 | #ifdef STABS | 64 | #ifdef STABS | |
65 | #define STABS_LINE(x) if (gflag && cftnsp) stabs_line(x) | 65 | #define STABS_LINE(x) if (gflag && cftnsp) stabs_line(x) | |
66 | #else | 66 | #else | |
67 | #define STABS_LINE(x) | 67 | #define STABS_LINE(x) | |
68 | #endif | 68 | #endif | |
69 | #if defined(FLEX_SCANNER) && YY_FLEX_SUBMINOR_VERSION == 31 | 69 | #if defined(FLEX_SCANNER) && YY_FLEX_SUBMINOR_VERSION == 31 | |
70 | /* Hack to avoid unnecessary warnings */ | 70 | /* Hack to avoid unnecessary warnings */ | |
@@ -133,28 +133,31 @@ extern void yyset_lineno (int); | @@ -133,28 +133,31 @@ extern void yyset_lineno (int); | |||
133 | {UL}({UL}|{D})* { struct symtab *s; | 133 | {UL}({UL}|{D})* { struct symtab *s; | |
134 | int i = 0; | 134 | int i = 0; | |
135 | 135 | |||
136 | yylval.strp = addname(yytext); | 136 | yylval.strp = addname(yytext); | |
137 | #ifdef GCC_COMPAT | 137 | #ifdef GCC_COMPAT | |
138 | if (doing_init && nodinit == 0) { | 138 | if (doing_init && nodinit == 0) { | |
139 | /* check for name: for old gcc compat */ | 139 | /* check for name: for old gcc compat */ | |
140 | while ((i = input()) == ' ' || i == '\t') | 140 | while ((i = input()) == ' ' || i == '\t') | |
141 | ; | 141 | ; | |
142 | if (i == ':') | 142 | if (i == ':') | |
143 | return(GCC_DESIG); | 143 | return(GCC_DESIG); | |
144 | unput(i); | 144 | unput(i); | |
145 | } | 145 | } | |
146 | if ((i = gcc_keyword(yylval.strp, &yylval.nodep)) > 0) | 146 | if ((i = gcc_keyword(yylval.strp, &yylval.nodep)) > 0) { | |
147 | if (i == PCC_OFFSETOF) | |||
148 | inoso = 1; | |||
147 | return i; | 149 | return i; | |
150 | } | |||
148 | #endif | 151 | #endif | |
149 | if (i == 0) { | 152 | if (i == 0) { | |
150 | if (notype) | 153 | if (notype) | |
151 | return(C_NAME); | 154 | return(C_NAME); | |
152 | s = lookup(yylval.strp, SNOCREAT); | 155 | s = lookup(yylval.strp, SNOCREAT); | |
153 | return s && s->sclass == TYPEDEF ? | 156 | return s && s->sclass == TYPEDEF ? | |
154 | notype=1, C_TYPENAME : C_NAME; | 157 | notype=1, C_TYPENAME : C_NAME; | |
155 | } | 158 | } | |
156 | } | 159 | } | |
157 | 160 | |||
158 | 0[xX]{H}+{IS}? { yylval.nodep = cvtdig(16); return(C_ICON); } | 161 | 0[xX]{H}+{IS}? { yylval.nodep = cvtdig(16); return(C_ICON); } | |
159 | 0{D}+{IS}? { yylval.nodep = cvtdig(8); return(C_ICON); } | 162 | 0{D}+{IS}? { yylval.nodep = cvtdig(8); return(C_ICON); } | |
160 | {D}+{IS}? { yylval.nodep = cvtdig(10); return(C_ICON); } | 163 | {D}+{IS}? { yylval.nodep = cvtdig(10); return(C_ICON); } | |
@@ -185,31 +188,32 @@ L?\"(\\.|[^\\"])*\" { yylval.strp = yyte | @@ -185,31 +188,32 @@ L?\"(\\.|[^\\"])*\" { yylval.strp = yyte | |||
185 | "<<" { yylval.intval = LS; return(C_SHIFTOP); } | 188 | "<<" { yylval.intval = LS; return(C_SHIFTOP); } | |
186 | "++" { yylval.intval = INCR; return(C_INCOP); } | 189 | "++" { yylval.intval = INCR; return(C_INCOP); } | |
187 | "--" { yylval.intval = DECR; return(C_INCOP); } | 190 | "--" { yylval.intval = DECR; return(C_INCOP); } | |
188 | "->" { yylval.intval = STREF; return(C_STROP); } | 191 | "->" { yylval.intval = STREF; return(C_STROP); } | |
189 | "&&" { yylval.intval = ANDAND; return(C_ANDAND); } | 192 | "&&" { yylval.intval = ANDAND; return(C_ANDAND); } | |
190 | "||" { yylval.intval = OROR; return(C_OROR); } | 193 | "||" { yylval.intval = OROR; return(C_OROR); } | |
191 | "<=" { yylval.intval = LE; return(C_RELOP); } | 194 | "<=" { yylval.intval = LE; return(C_RELOP); } | |
192 | ">=" { yylval.intval = GE; return(C_RELOP); } | 195 | ">=" { yylval.intval = GE; return(C_RELOP); } | |
193 | "==" { yylval.intval = EQ; return(C_EQUOP); } | 196 | "==" { yylval.intval = EQ; return(C_EQUOP); } | |
194 | "!=" { yylval.intval = NE; return(C_EQUOP); } | 197 | "!=" { yylval.intval = NE; return(C_EQUOP); } | |
195 | ";" { notype = 0; return(';'); } | 198 | ";" { notype = 0; return(';'); } | |
196 | ("{"|"<%") { notype = 0; return('{'); } | 199 | ("{"|"<%") { notype = 0; return('{'); } | |
197 | ("}"|"%>") { if (rpole) notype = 1; return('}'); } | 200 | ("}"|"%>") { if (rpole) notype = 1; return('}'); } | |
198 | "," { if (parbal) notype = 0; return(','); } | 201 | "," { if (parbal && !inoso) notype = 0; return(','); } | |
199 | ":" { if (doing_init) nodinit--; return(':'); } | 202 | ":" { if (doing_init) nodinit--; return(':'); } | |
200 | "=" { return('='); } | 203 | "=" { return('='); } | |
201 | "(" { parbal++; notype = 0; return('('); } | 204 | "(" { parbal++; notype = 0; return('('); } | |
202 | ")" { parbal--; | 205 | ")" { parbal--; | |
206 | inoso = 0; | |||
203 | if (parbal==0) { notype = 0; } | 207 | if (parbal==0) { notype = 0; } | |
204 | if (inattr && parlvl == parbal) | 208 | if (inattr && parlvl == parbal) | |
205 | inattr = 0; | 209 | inattr = 0; | |
206 | return(')'); } | 210 | return(')'); } | |
207 | ("["|"<:") { return('['); } | 211 | ("["|"<:") { return('['); } | |
208 | ("]"|":>") { return(']'); } | 212 | ("]"|":>") { return(']'); } | |
209 | "." { yylval.intval = DOT; return(C_STROP); } | 213 | "." { yylval.intval = DOT; return(C_STROP); } | |
210 | "&" { return('&'); } | 214 | "&" { return('&'); } | |
211 | "!" { yylval.intval = NOT; return(C_UNOP); } | 215 | "!" { yylval.intval = NOT; return(C_UNOP); } | |
212 | "~" { yylval.intval = COMPL; return(C_UNOP); } | 216 | "~" { yylval.intval = COMPL; return(C_UNOP); } | |
213 | "-" { return('-'); } | 217 | "-" { return('-'); } | |
214 | "+" { return('+'); } | 218 | "+" { return('+'); } | |
215 | "*" { if (parbal && notype == 0) notype = 1; return('*'); } | 219 | "*" { if (parbal && notype == 0) notype = 1; return('*'); } |
--- src/external/bsd/pcc/dist/pcc/mip/common.c 2011/09/01 12:55:30 1.3
+++ src/external/bsd/pcc/dist/pcc/mip/common.c 2012/01/11 20:46:48 1.4
@@ -1,15 +1,15 @@ | @@ -1,15 +1,15 @@ | |||
1 | /* Id: common.c,v 1.98 2011/08/20 21:54:33 plunky Exp */ | 1 | /* Id: common.c,v 1.99 2011/11/14 11:52:13 plunky Exp */ | |
2 | /* $NetBSD: common.c,v 1.3 2011/09/01 12:55:30 plunky Exp $ */ | 2 | /* $NetBSD: common.c,v 1.4 2012/01/11 20:46:48 plunky Exp $ */ | |
3 | /* | 3 | /* | |
4 | * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). | 4 | * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
15 | * | 15 | * | |
@@ -169,48 +169,65 @@ static char *warntxt[] = { | @@ -169,48 +169,65 @@ static char *warntxt[] = { | |||
169 | char *flagstr[] = { | 169 | char *flagstr[] = { | |
170 | "truncate", "strict-prototypes", "missing-prototypes", | 170 | "truncate", "strict-prototypes", "missing-prototypes", | |
171 | "implicit-int", "implicit-function-declaration", "shadow", | 171 | "implicit-int", "implicit-function-declaration", "shadow", | |
172 | "pointer-sign", "sign-compare", "unknown-pragmas", | 172 | "pointer-sign", "sign-compare", "unknown-pragmas", | |
173 | "unreachable-code", | 173 | "unreachable-code", | |
174 | }; | 174 | }; | |
175 | 175 | |||
176 | /* | 176 | /* | |
177 | * "emulate" the gcc warning flags. | 177 | * "emulate" the gcc warning flags. | |
178 | */ | 178 | */ | |
179 | void | 179 | void | |
180 | Wflags(char *str) | 180 | Wflags(char *str) | |
181 | { | 181 | { | |
182 | int i, flagval; | 182 | int i, isset, iserr; | |
183 | 183 | |||
184 | if (strncmp("no-", str, 3) == 0) { | 184 | /* handle -Werror specially */ | |
185 | str += 3; | 185 | if (strcmp("error", str) == 0) { | |
186 | flagval = 0; | |||
187 | } else | |||
188 | flagval = 1; | |||
189 | if (strcmp(str, "error") == 0) { | |||
190 | /* special */ | |||
191 | for (i = 0; i < NUMW; i++) | 186 | for (i = 0; i < NUMW; i++) | |
192 | BITSET(werrary, i); | 187 | BITSET(werrary, i); | |
188 | ||||
193 | return; | 189 | return; | |
194 | } | 190 | } | |
191 | ||||
192 | isset = 1; | |||
193 | if (strncmp("no-", str, 3) == 0) { | |||
194 | str += 3; | |||
195 | isset = 0; | |||
196 | } | |||
197 | ||||
198 | iserr = 0; | |||
199 | if (strncmp("error=", str, 6) == 0) { | |||
200 | str += 6; | |||
201 | iserr = 1; | |||
202 | } | |||
203 | ||||
195 | for (i = 0; i < NUMW; i++) { | 204 | for (i = 0; i < NUMW; i++) { | |
196 | if (strcmp(flagstr[i], str) != 0) | 205 | if (strcmp(flagstr[i], str) != 0) | |
197 | continue; | 206 | continue; | |
198 | if (flagval) | 207 | ||
208 | if (isset) { | |||
209 | if (iserr) | |||
210 | BITSET(werrary, i); | |||
199 | BITSET(warnary, i); | 211 | BITSET(warnary, i); | |
200 | else | 212 | } else if (iserr) { | |
213 | BITCLEAR(werrary, i); | |||
214 | } else { | |||
201 | BITCLEAR(warnary, i); | 215 | BITCLEAR(warnary, i); | |
216 | } | |||
217 | ||||
202 | return; | 218 | return; | |
203 | } | 219 | } | |
220 | ||||
204 | fprintf(stderr, "unrecognised warning option '%s'\n", str); | 221 | fprintf(stderr, "unrecognised warning option '%s'\n", str); | |
205 | } | 222 | } | |
206 | 223 | |||
207 | /* | 224 | /* | |
208 | * Deal with gcc warnings. | 225 | * Deal with gcc warnings. | |
209 | */ | 226 | */ | |
210 | void | 227 | void | |
211 | warner(int type, ...) | 228 | warner(int type, ...) | |
212 | { | 229 | { | |
213 | va_list ap; | 230 | va_list ap; | |
214 | char *w; | 231 | char *w; | |
215 | 232 | |||
216 | if (TESTBIT(warnary, type) == 0) | 233 | if (TESTBIT(warnary, type) == 0) |