History log of /freebsd-10.1-release/contrib/gcc/c-common.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 261188 26-Jan-2014 pfg

MFC r260311, r260831:

gcc: Add support for Apple's Block extension

Block objects [1] are a C-level syntactic and runtime feature. They
are similar to standard C functions, but in addition to executable
code they may also contain variable bindings to automatic (stack)
or managed (heap) memory. A block can therefore maintain a set of
state (data) that it can use to impact behavior when executed.

This port is based on Apple's GCC 5646 with some bugfixes from
Apple GCC 5666.3. It has some small differences with the support
in clang, which remains the recommended compiler.

Perhaps the most notable difference is that in GCC __block is not
actually a keyword, but a macro. There may be workaround for this
issue in the future. Other issues can be consulted in the clang
documentation [2]

For better compatiblity with Apple's GCC and llvm-gcc, some related
fixes and features from Apple have been included. Support for the
non-standard nested functions in GCC is now off by default.

No effort was made to update the ObjC support since FreeBSD doesn't
carry ObjC in the base system but some of the code crept in and
was more difficult to remove than to adjust.

References:
[1]
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Blocks/Articles/00_Introduction.html
[2]
http://clang.llvm.org/compatibility.html#block-variable-initialization

Obtained from: Apple GCC 4.2


# 260918 20-Jan-2014 pfg

MFC r260014, r260099:

gcc: Add support for label attributes and "unavailable" attribute.

Apple GCC has extensions to support for both label attributes and
an "unavailable" attribute. These are critical for objc but are
also useful in regular C/C++.

Obtained from: Apple GCC 4.2 - 5531


# 260074 30-Dec-2013 pfg

MFC r259005, r259092:

gcc: Add -flax-vector-conversions
gcc: new fvisibility-ms-compat option

These are useful for compatibility with newwer gcc and clang.

Obtained from: gcc 4.3 (rev. 120572, 120688, 126088; GPLv2)


# 260011 28-Dec-2013 pfg

MFC r259666, r259696:

gcc: warnings from -Wformat-security

Obtained from: Apple GCC 4.2 - 5646 (Radar 5764921)


# 259947 27-Dec-2013 pfg

gcc: Merge upstream changes.

Include types in error message for build_binary_op.

Mostly cosmetic changes, to reduce differences with Apple's gcc.

Obtained from: gcc 4.3 (rev. 120611, 124839, 125239; GPLv2)


# 259694 21-Dec-2013 pfg

MFC r258017, r258429, r258748, r258817:

Merge updates from FSF pre4.3 GCC inspired on Apple's gcc:

Updates to libiberty and mangling.
New align attribute.
Merge Apple updates to libstdc++.


# 259584 19-Dec-2013 pfg

MFC r258731:

gcc: Make use of TREE_OVERFLOW_P.

While it was brought in r258179 only to fix a build issue,
bringing the rest of the change has the advantage of fixing
GCC/19978.

Obtained from: gcc 4.3 (rev. 120505; GPLv2)


# 259405 15-Dec-2013 pfg

MFC rr258501, r258507;
gcc: Bring updates from Google's enhanced gcc-4.2.1.

Google released and enhanced version of gcc-4.2.1 plus their local
patches for Android[1].

The patches are owned by Google and the license hasn't been changed
from the original GPLv2. We are only bringing a subset of the
available patches that may be helpful in FreeBSD, in other words,
changes specific to android are not included.

From the README.google file[1].

Patches applied to google_vendor_src_branch/gcc/gcc-4.2.1:

gcc/Makefile.in
gcc/c-common.c
gcc/c-common.h
gcc/c-opts.c
gcc/c-typeck.c
gcc/cp/typeck.c
gcc/doc/invoke.texi
gcc/flags.h
gcc/opts.c
gcc/tree-flow.h
gcc/tree-ssa-alias-warnings.c
gcc/tree-ssa-alias.c

Backport of -Wstrict-aliasing from mainline.
Silvius Rus <rus@google.com>

gcc/coverage.c:
Patch coverage_checksum_string for PR 25351.
Seongbae Park <spark@google.com>
Not yet submitted to FSF.

gcc/c-opts.c
gcc/c-ppoutput.c
gcc/c.opt
gcc/doc/cppopts.texi
libcpp/Makefile.in
libcpp/directives-only.c
libcpp/directives.c
libcpp/files.c
libcpp/include/cpplib.h
libcpp/init.c
libcpp/internal.h
libcpp/macro.c
Support for -fdirectives-only.
Ollie Wild <aaw@google.com>.
Submitted to FSF but not yet approved.

libstdc++-v3/include/ext/hashtable.h
http://b/742065
http://b/629994
Reduce min size of hashtable for hash_map, hash_set from 53 to 5

libstdc++-v3/include/ext/hashtable.h
http://b/629994
Do not iterate over buckets if hashtable is empty.

gcc/common.opt
gcc/doc/invoke.texi
gcc/flags.h
gcc/gimplify.c
gcc/opts.c
Add Saito's patch for -finstrument-functions-exclude-* options.

gcc/common.opt
gcc/doc/invoke.texi
gcc/final.c
gcc/flags.h
gcc/opts.c
gcc/testsuite/gcc.dg/Wframe-larger-than.c
Add a new flag -Wframe-larger-than- which enables a new warning
when a frame size of a function is larger than specified.
This patch hasn't been integrated into gcc mainline yet.

gcc/tree-vrp.c
Add a hack to avoid using ivopts information for pointers starting
at constant values.

Reference:

[1]
https://android.googlesource.com/toolchain/gcc/+/master/gcc-4.2.1/

Obtained from: Google Inc.


# 259268 12-Dec-2013 pfg

MFC r258081, r258138, r258143, r258179, r258157, r258204, 258205,
r258206, r258207, r258321

This is a series of commits inspired on Google's gcc-4.2.1 for
Android that were taken from the gcc pre-4.3 under the GPLv2.

gcc: Backport fixes for -W parentheses in C++
This fixes GCC 19564.
gcc: merge rs6000 change from FSF pre-gcc43
Don't set MASK_PPC_GFXOPT for 8540 or 8548.
Merge vrp-tree fix from gcc-4.3
Fix missed conversion from / to >> (GCC PR32521)
Merge in GCCr120505 to include definition of TREE_OVERFLOW_P
gcc: warn about integer overflow in constant expressions in the C++ frontend.
gcc: Add a new option -Wvla to warn variable length array.
libcpp: preprocessor speedup patches from upstream gcc.
gcc: add femit-struct-debug support to reduce Reduce dwarf debug size
gcc: Fix postreload-gcse treatment of call-clobbered registers.
gcc: Record some previous commits in the ChangeLog.gcc43 file.


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 169699 19-May-2007 kan

FreeBSD uses unchanged versions of this files.


# 161660 26-Aug-2006 kan

Resolve conflicts after GCC 3.4.6 20060825 import.


# 146908 03-Jun-2005 kan

Merge conflicts for GCC 3.4.4.


# 132728 28-Jul-2004 kan

Merge FreeBSD changes into GCC 3.4.2-prerelease.
r1.18: Move FreeBSD specific flag variables from c-decl.c here.


# 117431 11-Jul-2003 kan

Merge FreeBSD changes into GCC 3.3.1-prerelease.
Move FreeBSD specific flag variables from c-decl.c here.


# 117404 11-Jul-2003 kan

FreeBSD uses stock versions of these GCC files.


# 110621 10-Feb-2003 kan

Update HEAD with stock GCC 3.2.2 release files.


# 107604 04-Dec-2002 obrien

Use pure stock files.


# 102798 01-Sep-2002 kan

Use the stock 3.2.1-prerelease file.

Approved by: obrien


# 96275 09-May-2002 obrien

Use the stock 3.1-prerelease file.


# 90082 01-Feb-2002 obrien

We use the stock 3.1-snap file now.
All the -Wformat related code moved to c-format.c.


# 77193 25-May-2001 obrien

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>


# 59376 18-Apr-2000 obrien

Clarify that the "yields only last 2 digits of year in some locales" warning
does not apply to BSD.

Submitted by: ache


# 59347 18-Apr-2000 obrien

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>


# 52761 01-Nov-1999 obrien

Merge our -fformat-extensions and printf0() into GCC 2.95.2.


# 52299 16-Oct-1999 obrien

Merge our -fformat-extensions and printf0() into GCC 2.95.1.


# 50451 27-Aug-1999 obrien

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


# 50450 27-Aug-1999 obrien

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


# 50449 27-Aug-1999 obrien

Fix conflicts.
This brings revs 1.2 (-fformat-extensions) and 1.3 (printf0())
into EGCS 1.1.2.


# 38510 24-Aug-1998 bde

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.


# 37654 15-Jul-1998 jdp

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.


# 18335 18-Sep-1996 peter

This commit was generated by cvs2svn to compensate for changes in r18334,
which included commits to RCS files with non-trunk default branches.


# 18334 18-Sep-1996 peter

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.