Commit Graph

22 Commits

Author SHA1 Message Date
Alexander Kabaev
9d6b9560a8 FreeBSD uses unchanged versions of this files. 2007-05-19 02:12:21 +00:00
Alexander Kabaev
f2d5255ddd Resolve conflicts after GCC 3.4.6 20060825 import. 2006-08-26 21:37:21 +00:00
Alexander Kabaev
c3cbf7fdb9 Merge conflicts for GCC 3.4.4. 2005-06-03 04:02:20 +00:00
Alexander Kabaev
48b98bbb98 Merge FreeBSD changes into GCC 3.4.2-prerelease.
r1.18: Move FreeBSD specific flag variables from c-decl.c here.
2004-07-28 03:40:54 +00:00
Alexander Kabaev
46b370ef71 Merge FreeBSD changes into GCC 3.3.1-prerelease.
Move FreeBSD specific flag variables from c-decl.c here.
2003-07-11 06:00:50 +00:00
Alexander Kabaev
b2bcf6753d FreeBSD uses stock versions of these GCC files. 2003-07-11 04:00:23 +00:00
Alexander Kabaev
d79e61dc75 Update HEAD with stock GCC 3.2.2 release files. 2003-02-10 05:57:03 +00:00
David E. O'Brien
21da7e2bd7 Use pure stock files. 2002-12-04 16:31:48 +00:00
Alexander Kabaev
2556bafc14 Use the stock 3.2.1-prerelease file.
Approved by:	obrien
2002-09-01 21:08:29 +00:00
David E. O'Brien
e3f1715f75 Use the stock 3.1-prerelease file. 2002-05-09 21:11:21 +00:00
David E. O'Brien
1a321c6fba We use the stock 3.1-snap file now.
All the -Wformat related code moved to c-format.c.
2002-02-01 18:53:34 +00:00
David E. O'Brien
741a3bc754 Teach gcc about '%+' so it will not warn when using '%+' in a format
string when using strftime(), since our libc supports it.

PR:             26827
Submitted by:   Marc Olzheim <marcolz@ilse.nl>
2001-05-25 19:00:07 +00:00
David E. O'Brien
a6f1a0f45e Clarify that the "yields only last 2 digits of year in some locales" warning
does not apply to BSD.

Submitted by:	ache
2000-04-18 20:01:07 +00:00
David E. O'Brien
6876d9f694 From FSFChangeLog: (tfaff): Now a function, not a string. All users changed.
I did not catch this on the EGCS 1.1.x --> GCC 2.95 upgrade.
So propogate this change to our custom hacks.

PR:		15549
Submitted by:	Naohiko Tsuji <yakisoba@osaka.interq.or.jp>
		Patrick Bihan-Faou <patrick@mindstep.com>
2000-04-18 04:13:29 +00:00
David E. O'Brien
60766cff6e Merge our -fformat-extensions and printf0() into GCC 2.95.2. 1999-11-01 18:41:09 +00:00
David E. O'Brien
a659e1e661 Merge our -fformat-extensions and printf0() into GCC 2.95.1. 1999-10-16 08:28:26 +00:00
David E. O'Brien
1428ce0f83 Don't accept %q length specifiers in the kernel (more precisely,
if compiling with -fformat-extensions). Gcc's format checker never
actually supported %q length specifiers.  It treats %q as an alias
for %ll, which is correct if quad_t is long long (e.g., on i386's)
and broken otherwise (e.g., on alphas).

quad_t's currently should be printed in the same way that they
already need to be printed to avoid compiler warnings on all
supported systems: cast them to a standard type that is at least
as large (long or long long) and use the length specifier for that
(%l or %ll).  This is problematic since long long isn't standard
yet.  C9x's intmax_t should be implemented soon.

Don't accept %L length specifiers in the kernel either.  The only
legitimate ones are for long doubles, but the kernel doesn't even
support plain doubles.  (gcc bogusly accepts %Ld as an alias for
%lld, and it sometimes prints "q" in error messages about "ll" and
"L" length specifiers, becauses it represents all these specifiers
as 'q'.)

Submitted by:	bde
1999-08-27 10:05:08 +00:00
David E. O'Brien
35edbffe27 Fixed kernel format checking:
- plain %r and %z were disallowed.  The hard NULs in the warnings were
  hopefully caused by disallowing of plain formats being nonsense.
- new formats for shortening to a byte were allowed, but even the libc
  printf doesn't support them.
- old %hr and %hz formats were allowed, but the kernel printf doesn't
  support them.  The kernel doesn't support %hd either, but this is
  harder to fix.

Submitted by:	bde
1999-08-27 10:02:56 +00:00
David E. O'Brien
1fc70153e9 Fix conflicts.
This brings revs 1.2 (-fformat-extensions) and 1.3 (printf0())
into EGCS 1.1.2.
1999-08-27 10:01:05 +00:00
Bruce Evans
0f79d73473 Support printf format checking of FreeBSD kernel formats %[Dbrz].
This is enabled by the undocumented option -fformat-extensions.
This option should be named better and/or give more control over
the extensions.

Fixed a message - don't warn about the field width when it's the
precision that has the wrong type.  Didn't fix excessive checking
for the precision relative to the type - ANSI requires both to be
ints, but gcc permits the field width to be either int or unsigned
int.
1998-08-24 06:33:52 +00:00
John Polstra
3bc25faee6 Add support for a new archetype "printf0" for the "format" function
attribute.  It is like the existing "printf" archetype, except that
it doesn't complain if the format string is a null pointer.  See
the node "Function Attributes" in the GCC info pages if you don't
know what this is all about.

This change will allow us to add format string checking for the
err(3) family of functions.
1998-07-15 04:22:45 +00:00
Peter Wemm
a4cd5630b0 Import of unmodified (but trimmed) gcc-2.7.2. The bigger parts of the
non-i386, non-unix, and generatable files have been trimmed, but can easily
be added in later if needed.

gcc-2.7.2.1 will follow shortly, it's a very small delta to this and it's
handy to have both available for reference for such little cost.

The freebsd-specific changes will then be committed, and once the dust has
settled, the bmakefiles will be committed to use this code.
1996-09-18 05:35:50 +00:00