Commit 3ea8083f by Jonathan Larmour Committed by Richard Henderson

Jonathan Larmour <jlarmour@redhat.co.uk>:

Add new __GNUC_PATCHLEVEL__ define.

From-SVN: r32004
parent ba96c72d
2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
* gcc.c (default_compilers): Add new __GNUC_PATCHLEVEL__ define
to default cpp spec.
(do_spec_1): Add support for %v3 spec used by __GNUC_PATCHLEVEL__.
* cpp.texi: Document __GNUC_PATCHLEVEL__.
* cpp.1: Likewise.
* objc/lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to
default spec.
2000-02-15 Denis Chertykov <denisc@overta.ru>
* configure.in: Add support for avr target.
......@@ -32,7 +43,7 @@ Tue Feb 15 23:22:26 2000 Andrew Haley <aph@cygnus.com>
* config/sh/sh.h: Correct comment about macros.
Tue Feb 15 22:30:36 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
Andrew MacLeod <amacleod@cygnus.com>
Andrew MacLeod <amacleod@cygnus.com>
* Makefile.in (lcm.o): Depend on insn-attr.h.
* basic-block.h (optimize_mode_switching): Declare.
......@@ -127,7 +138,7 @@ Tue Feb 15 22:30:36 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
to import the frames themselves.
Mon Feb 14 13:31:01 2000 Stan Cox <scox@cygnus.com>
Jason Eckhardt <jle@cygnus.com>
Jason Eckhardt <jle@cygnus.com>
* basic_block.h: Added prototype for reorder_basic_blocks.
* toplev.c: Changes to add -freorder-blocks and graph dump after
......@@ -226,28 +237,28 @@ Sat Feb 12 01:44:26 MET 2000 Jan Hubicka <jh@suse.cz>
two types have compatable, arm specific, attributes.
* config/arm/arm.h (CUMULATIVE_ARGS): Redefine to be a
structure.
structure.
(FUNCTION_ARG): Redefine to call arm_function_arg.
(FUNCTION_ARG_PARTIAL_NREGS): Redefine to use correct
structure field.
structure field.
(INIT_CUMULATIVE_ARGS): Redefine to call
arm_init_cumulative_args.
arm_init_cumulative_args.
(FUNCTION_ARG_ADVANCE): Redefine to use correct structure
field.
field.
(SETUP_INCOMING_VARARGS): Redefine to use correct structure
field.
field.
(ARM_MARK_NEARBY_FUNCTION): New macro: Mark already compiled
functions.
functions.
(ENCODE_SECTION): Add call to ARM_MARK_NEARBY_FUNCTION.
(VALID_MACHINE_TYPE_ATTRIBUTE): Define.
(COMP_TYPE_ATTRIBUTES): Define.
* config/arm/arm.md (call): Call arm_is_long_call_p to decide
if a long call is needed.
if a long call is needed.
(call_value): Call arm_is_long_call_p to decide if a long call
is needed.
is needed.
(call_symbol): Call arm_is_long_call_p to decide if a long call
is needed.
is needed.
* config/arm/arm-protos.h: Add prototype for arm_is_long_call_p.
......
2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
* lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* grant.c: Don't declare `version_string'.
......
......@@ -26,7 +26,7 @@ Boston, MA 02111-1307, USA. */
{"@chill",
{"cpp -lang-chill %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{C:%{!E:%eGNU CHILL does not support -C without using -E}}\
%{!no-gcc:-D__GNUCHILL__=%v1 -D__GNUC_MINOR__=%v2}\
%{!no-gcc:-D__GNUCHILL__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3}\
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
%{traditional-cpp:-traditional} %{!undef:%{!ansi:%p} %P} %{trigraphs}\
%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
......
2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
* lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
* decl2.c (lang_decode_option): Enable automatic line wrapping.
......
......@@ -33,8 +33,8 @@ Boston, MA 02111-1307, USA. */
"%{E|M|MM:cpp -lang-c++ %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{C:%{!E:%eGNU C++ does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUG__=%v1 -D__GNUC_MINOR__=%v2}\
-D__cplusplus\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUG__=%v1 -D__GNUC_MINOR__=%v2\
-D__GNUC_PATCHLEVEL__=%v3} -D__cplusplus\
%{ansi:-trigraphs -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
%{!fno-exceptions:-D__EXCEPTIONS}\
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} %{trigraphs}\
......@@ -46,7 +46,8 @@ Boston, MA 02111-1307, USA. */
-lang-c++ %{nostdinc*} %{C} %{A*} %{I*} %{P} %{$} %I\
%{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUG__=%v1\
-D__GNUC_MINOR__=%v2} -D__cplusplus\
-D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3}\
-D__cplusplus\
%{ansi:-trigraphs -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
%{!fno-exceptions:-D__EXCEPTIONS}\
%{fnew-abi:-D__GXX_ABI_VERSION=100}\
......@@ -68,8 +69,8 @@ Boston, MA 02111-1307, USA. */
{"cpp -lang-c++ %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{C:%{!E:%eGNU C++ does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUG__=%v1 -D__GNUC_MINOR__=%v2}\
-D__cplusplus\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUG__=%v1 -D__GNUC_MINOR__=%v2\
-D__GNUC_PATCHLEVEL__=%v3} -D__cplusplus\
%{ansi:-trigraphs -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
%{!fno-exceptions:-D__EXCEPTIONS}\
%{fnew-abi:-D__GXX_ABI_VERSION=100}\
......
......@@ -401,9 +401,9 @@ wins.
.Ip "\fB\-undef\fR" 4
Do not predefine any nonstandard macros.
.Ip "\fB\-gcc\fR" 4
Define the macros \fI_\|_GNUC_\|_\fR and \fI_\|_GNUC_MINOR_\|_\fR. These are
defined automatically when you use \fBgcc \-E\fR; you can turn them off
in that case with \fB\-no-gcc\fR.
Define the macros \fI_\|_GNUC_\|_\fR, \fI_\|_GNUC_MINOR_\|_\fR and
\fI_\|_GNUC_PATCHLEVEL_\|_\fR. These are defined automatically when you
use \fBgcc \-E\fR; you can turn them off in that case with \fB\-no-gcc\fR.
.Ip "\fB\-A \fIpredicate\fR(\fIanswer\fR)\fR" 4
Make an assertion with the predicate \fIpredicate\fR and answer
\fIanswer\fR.
......
......@@ -978,9 +978,16 @@ The macro contains the minor version number of the compiler. This can
be used to work around differences between different releases of the
compiler (for example, if gcc 2.6.3 is known to support a feature, you
can test for @code{__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6)}).
The last number, @samp{3} in the
example above, denotes the bugfix level of the compiler; no macro
contains this value.
@item __GNUC_PATCHLEVEL__
@findex __GNUC_PATCHLEVEL__
This macro contains the patch level of the compiler. This can be
used to work around differences between different patch level releases
of the compiler (for example, if gcc 2.6.2 is known to contain a bug,
whereas gcc 2.6.3 contains a fix, and you have code which can workaround
ths problem depending on whether the bug is fixed or not, you can test for
@code{__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 6) ||
(__GNUC__ == 2 && __GNUC_MINOR__ == 6 && __GNUC_PATCHLEVEL__ > 3)}).
@item __GNUG__
@findex __GNUG__
......@@ -2870,9 +2877,9 @@ Do not predefine any nonstandard macros.
@item -gcc
@findex -gcc
Define the macros @var{__GNUC__} and @var{__GNUC_MINOR__}. These are
defined automatically when you use @samp{gcc -E}; you can turn them off
in that case with @samp{-no-gcc}.
Define the macros @var{__GNUC__}, @var{__GNUC_MINOR__} and
@var{__GNUC_PATCHLEVEL__}. These are defined automatically when you use
@samp{gcc -E}; you can turn them off in that case with @samp{-no-gcc}.
@item -A @var{predicate}(@var{answer})
@findex -A
......
2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
* lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
Tue Feb 15 11:14:17 2000 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* g77spec.c: Don't declare `version_string'.
......
......@@ -38,7 +38,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
{"cpp -lang-fortran %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2}\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3}\
%{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
%{!undef:%P} -D_LANGUAGE_FORTRAN %{trigraphs} \
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} -traditional\
......@@ -88,7 +88,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
{"cpp -lang-fortran %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I \
%{C:%{!E:%eGNU C does not support -C without using -E}} \
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG} \
%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2} \
%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3} \
%{ansi:-trigraphs -$ -D__STRICT_ANSI__} \
%{!undef:%P} -D_LANGUAGE_FORTRAN %{trigraphs} \
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} -traditional \
......
......@@ -327,9 +327,11 @@ or with constant text in a single argument.
%Y Output the accumulated assembler options specified by compilations.
%Z Output the accumulated preprocessor options specified by compilations.
%v1 Substitute the major version number of GCC.
(For version 2.5.n, this is 2.)
(For version 2.5.3, this is 2.)
%v2 Substitute the minor version number of GCC.
(For version 2.5.n, this is 5.)
(For version 2.5.3, this is 5.)
%v3 Substitute the patch level number of GCC.
(For version 2.5.3, this is 3.)
%a process ASM_SPEC as a spec.
This allows config.h to specify part of the spec for running as.
%A process ASM_FINAL_SPEC as a spec. A capital A is actually
......@@ -614,7 +616,7 @@ static struct compiler default_compilers[] =
%{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2}\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3}\
%{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
%{ffast-math:-D__FAST_MATH__}\
......@@ -628,7 +630,7 @@ static struct compiler default_compilers[] =
%{std*} %{nostdinc*} %{A*} %{I*} %I\
%{!Q:-quiet} -dumpbase %b.c %{d*} %{m*} %{a*}\
%{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2}\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3}\
%{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
%{ffast-math:-D__FAST_MATH__}\
......@@ -651,7 +653,7 @@ static struct compiler default_compilers[] =
%{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2}\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3}\
%{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
%{ffast-math:-D__FAST_MATH__}\
......@@ -679,7 +681,7 @@ static struct compiler default_compilers[] =
%{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2}\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3}\
%{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
%{ffast-math:-D__FAST_MATH__}\
......@@ -696,7 +698,7 @@ static struct compiler default_compilers[] =
cpp %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2}\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3}\
%{!undef:%{!std=*:%p}%{std=gnu*:%p} %P} %{trigraphs}\
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
%{ffast-math:-D__FAST_MATH__}\
......@@ -4497,6 +4499,7 @@ do_spec_1 (spec, inswitch, soft_matched_part)
int c1 = *p++; /* Select first or second version number. */
char *v = compiler_version;
char *q;
static const char zeroc = '0';
/* The format of the version string is
([^0-9]*-)?[0-9]+[.][0-9]+([.][0-9]+)?([- ].*)? */
......@@ -4508,7 +4511,7 @@ do_spec_1 (spec, inswitch, soft_matched_part)
abort ();
/* If desired, advance to second version number. */
if (c1 == '2')
if (c1 >= '2')
{
/* Set V after the first period. */
while (ISDIGIT (*v))
......@@ -4518,6 +4521,19 @@ do_spec_1 (spec, inswitch, soft_matched_part)
v++;
}
/* If desired, advance to third version number.
But don't complain if it's not present */
if (c1 == '3')
{
/* Set V after the second period. */
while (ISDIGIT (*v))
v++;
if ((*v != 0) && (*v != ' ') && (*v != '.') && (*v != '-'))
abort ();
if (*v != 0)
v++;
}
/* Set Q at the next period or at the end. */
q = v;
while (ISDIGIT (*q))
......@@ -4525,8 +4541,12 @@ do_spec_1 (spec, inswitch, soft_matched_part)
if (*q != 0 && *q != ' ' && *q != '.' && *q != '-')
abort ();
/* Put that part into the command. */
obstack_grow (&obstack, v, q - v);
if (q > v)
/* Put that part into the command. */
obstack_grow (&obstack, v, q - v);
else
/* Default to "0" */
obstack_grow (&obstack, &zeroc, 1);
arg_going = 1;
}
break;
......
......@@ -3237,6 +3237,7 @@ rest_of_compilation (decl)
if (optimize)
calculate_loop_depth (rtl_dump_file);
life_analysis (insns, max_reg_num (), rtl_dump_file, 1);
mark_constant_function ();
});
if (warn_uninitialized || extra_warnings)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment