summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/c-common.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r260311, r260831:pfg2014-01-261-7/+352
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC r260014, r260099:pfg2014-01-201-2/+78
| | | | | | | | | | 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
* MFC r259005, r259092:pfg2013-12-301-12/+43
| | | | | | | | | 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)
* MFC r259666, r259696:pfg2013-12-281-2/+2
| | | | | | gcc: warnings from -Wformat-security Obtained from: Apple GCC 4.2 - 5646 (Radar 5764921)
* gcc: Merge upstream changes.pfg2013-12-271-3/+4
| | | | | | | | 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)
* MFC r258017, r258429, r258748, r258817:pfg2013-12-211-5/+17
| | | | | | | | 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++.
* MFC r258731:pfg2013-12-191-25/+31
| | | | | | | | | | 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)
* MFC rr258501, r258507;pfg2013-12-151-87/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* MFC r258081, r258138, r258143, r258179, r258157, r258204, 258205,pfg2013-12-121-3/+89
| | | | | | | | | | | | | | | | | | | | | 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.
* FreeBSD uses unchanged versions of this files.kan2007-05-191-1982/+2545
|
* Resolve conflicts after GCC 3.4.6 20060825 import.kan2006-08-261-0/+12
|
* Merge conflicts for GCC 3.4.4.kan2005-06-031-51/+43
|
* Merge FreeBSD changes into GCC 3.4.2-prerelease.kan2004-07-281-1809/+1025
| | | | r1.18: Move FreeBSD specific flag variables from c-decl.c here.
* Merge FreeBSD changes into GCC 3.3.1-prerelease.kan2003-07-111-0/+8
| | | | Move FreeBSD specific flag variables from c-decl.c here.
* FreeBSD uses stock versions of these GCC files.kan2003-07-111-596/+2953
|
* Update HEAD with stock GCC 3.2.2 release files.kan2003-02-101-6/+59
|
* Use pure stock files.obrien2002-12-041-2/+0
|
* Use the stock 3.2.1-prerelease file.kan2002-09-011-14/+29
| | | | Approved by: obrien
* Use the stock 3.1-prerelease file.obrien2002-05-091-10/+142
|
* We use the stock 3.1-snap file now.obrien2002-02-011-2162/+2955
| | | | All the -Wformat related code moved to c-format.c.
* Teach gcc about '%+' so it will not warn when using '%+' in a formatobrien2001-05-251-1/+1
| | | | | | | string when using strftime(), since our libc supports it. PR: 26827 Submitted by: Marc Olzheim <marcolz@ilse.nl>
* Clarify that the "yields only last 2 digits of year in some locales" warningobrien2000-04-181-1/+1
| | | | | | does not apply to BSD. Submitted by: ache
* From FSFChangeLog: (tfaff): Now a function, not a string. All users changed.obrien2000-04-181-2/+2
| | | | | | | | | 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>
* Merge our -fformat-extensions and printf0() into GCC 2.95.2.obrien1999-11-011-4/+48
|
* Merge our -fformat-extensions and printf0() into GCC 2.95.1.obrien1999-10-161-88/+322
|
* Don't accept %q length specifiers in the kernel (more precisely,obrien1999-08-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | 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
* Fixed kernel format checking:obrien1999-08-271-3/+3
| | | | | | | | | | | | - 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
* Fix conflicts.obrien1999-08-271-260/+983
| | | | | This brings revs 1.2 (-fformat-extensions) and 1.3 (printf0()) into EGCS 1.1.2.
* Support printf format checking of FreeBSD kernel formats %[Dbrz].bde1998-08-241-2/+60
| | | | | | | | | | | | 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.
* Add support for a new archetype "printf0" for the "format" functionjdp1998-07-151-15/+36
| | | | | | | | | | 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.
* Import of unmodified (but trimmed) gcc-2.7.2. The bigger parts of thepeter1996-09-181-0/+2255
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.
OpenPOWER on IntegriCloud