Re: [C PATCH] warn for empty struct -Wc++-compat

2014-11-11 Thread Joseph Myers
On Tue, 11 Nov 2014, Marek Polacek wrote: + if (fieldlist == NULL_TREE) +{ + warning_at (record_loc, OPT_Wc___compat, + empty %s has size 0 in C, 1 in C++, + (struct_parse_info-code == RECORD_TYPE) ? struct : union); +} + I think this won't

Re: [PATCH, MPX runtime 1/2] Integrate MPX runtime library

2014-11-11 Thread Joseph Myers
On Tue, 11 Nov 2014, Ilya Enkovich wrote: Hi, This patch integrates MPX runtime library into GCC source tree. MPX runtime is responsible for initialization of MPX feature in HW, signal handling, reporting etc. Library is linked to codes compiled with -mmpx. Bootstrap is OK for

Re: [PATCH, MPX runtime 1/2] Integrate MPX runtime library

2014-11-11 Thread Joseph Myers
On Tue, 11 Nov 2014, Joseph Myers wrote: You have lots of static writable variables. Are you sure all those variables are handled in a thread-safe way (e.g. only modified before any threads start)? Another general multi-thread issue for libraries: files should be opened with O_CLOEXEC

Re: [PATCH, MPX runtime 1/2] Integrate MPX runtime library

2014-11-11 Thread Joseph Myers
On Tue, 11 Nov 2014, Andi Kleen wrote: Joseph Myers jos...@codesourcery.com writes: On Tue, 11 Nov 2014, Ilya Enkovich wrote: Hi, This patch integrates MPX runtime library into GCC source tree. MPX runtime is responsible for initialization of MPX feature in HW, signal

Predefine __NO_MATH_ERRNO__ for -fno-math-errno

2014-11-11 Thread Joseph Myers
those options.) Bootstrapped with no regressions on x86_64-unknown-linux-gnu. OK to commit (the cppbuiltin.c changes)? 2014-11-11 Joseph Myers jos...@codesourcery.com * cppbuiltin.c (define_builtin_macros_for_compilation_flags): Define __NO_MATH_ERRNO__ if -fno-math-errno

Re: [PATCH, MPX runtime 1/2] Integrate MPX runtime library

2014-11-11 Thread Joseph Myers
On Tue, 11 Nov 2014, Andi Kleen wrote: On Tue, Nov 11, 2014 at 01:04:42PM -0800, H.J. Lu wrote: On Tue, Nov 11, 2014 at 1:01 PM, Andi Kleen a...@firstfloor.org wrote: It is similar to libsanitizer. Put it in glibc isn't going to work well for MPX. Can you explain it more please?

Re: [PATCH, MPX runtime 1/2] Integrate MPX runtime library

2014-11-11 Thread Joseph Myers
On Tue, 11 Nov 2014, H.J. Lu wrote: Currently mpx-runtime uses dlsym(RTLD_NEXT, sigaction); to get the original sigaction in liibc.so. Glibc does provides __sigaction for the original sigaction. But dlsym(RTLD_NEXT, is more portable. I guess there's a question of what the portability

Re: [PATCH, MPX runtime 1/2] Integrate MPX runtime library

2014-11-12 Thread Joseph Myers
On Wed, 12 Nov 2014, Ilya Enkovich wrote: MPX runtime needs to be linked with programs using MPX because it initializes hardware. Without it all MPX instructions are just NOPs. Thus it's not an extra functionality, but is for basic MPX functionality. So what if you just have the

Re: [PATCH, RFC, C] Add -fno-float to forbid floating point data types

2014-11-12 Thread Joseph Myers
On Wed, 12 Nov 2014, Thomas Preud'homme wrote: In several occasions (see [1][2] people requested a switch to tell GCC that a given compilation unit should not contain any float and that GCC should warn about any violation of this assumption. Such a switch would ensure that no softfloat

Re: [PATCH, Libatomic, Darwin] Initial libatomic port for *darwin*.

2014-11-12 Thread Joseph Myers
On Wed, 12 Nov 2014, Iain Sandoe wrote: libatomic: PR target/59305 (at least, I presume this fixes that bug; I don't know if there are any other relevant bugs in Bugzilla). * config/darwin/host-config.h New. * config/darwin/lock.c New. * configure.tgt

Re: [PATCH, MPX runtime 1/2] Integrate MPX runtime library

2014-11-12 Thread Joseph Myers
On Thu, 13 Nov 2014, Ilya Enkovich wrote: It's hard to decide which of runtime functionality should be considered as basic and how it should be used. We may say that the only basic thing is hardware enabling which is enable_mpx and stop here. But then you get minimal but quite useless

Re: [PATCH, MPX runtime 1/2] Integrate MPX runtime library

2014-11-13 Thread Joseph Myers
On Thu, 13 Nov 2014, Ilya Enkovich wrote: You can leave it as a single library - it's just that imposes libgcc-like constraints on what the library does and how it does things, so as to be usable for arbitrary programs built with MPX (e.g. using reserved-namespace names such as __write

RE: [PATCH, RFC, C] Add -fno-float to forbid floating point data types

2014-11-13 Thread Joseph Myers
On Thu, 13 Nov 2014, Thomas Preud'homme wrote: From: Joseph Myers [mailto:jos...@codesourcery.com] Sent: Wednesday, November 12, 2014 10:11 PM This patch modifies the C parser to give an error if: - any variable or function parameter is declared with a float type or a type

Re: [PATCH][ARM] Add Cortex-A17 support

2014-11-13 Thread Joseph Myers
New -mcpu= values need documenting in invoke.texi. -- Joseph S. Myers jos...@codesourcery.com

Re: OpenACC middle end changes

2014-11-13 Thread Joseph Myers
On Thu, 13 Nov 2014, Thomas Schwinge wrote: gcc/doc/invoke.texi | 14 You're adding documentation for -fopenacc, but I don't see any .opt file changes in this patch, and I'd expect the option to be added in the same patch as its documentation. -- Joseph S. Myers

Re: [PATCH] OpenACC for C front end

2014-11-13 Thread Joseph Myers
On Wed, 5 Nov 2014, James Norris wrote: Hi! This patch represents the changes for OpenACC 2.0 in the C front-end. At present these files will not compile as the changes for the middle end are not present. So will things compile with the combination of this patch and the middle-end patch

Re: [patch] OpenACC fortran front end

2014-11-14 Thread Joseph Myers
On Fri, 14 Nov 2014, Jakub Jelinek wrote: You want gfc_error (is_oacc (p) ? %s statement at %C leaving OpenACC structured block : %s statement at %C leaving OpenMP structured block, gfc_ascii_statement (st)); instead to be more

Re: [PATCH] Fix minimal alignment calculation for user-aligned types (PR63802)

2014-11-14 Thread Joseph Myers
On Fri, 14 Nov 2014, Jakub Jelinek wrote: On Fri, Nov 14, 2014 at 09:46:14AM +0300, Yury Gribov wrote: Hi all, This patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63802 by only limiting minimal type alignment with BIGGEST_ALIGNMENT for types with no __attribute__((aligned)).

Re: [PATCH, MPX wrappers 1/3] Add MPX wrappers library

2014-11-14 Thread Joseph Myers
On Fri, 14 Nov 2014, Ilya Enkovich wrote: Hi, This patch introduces a simple library with several wrappers to be used with MPX and Pointer Bounds Checker. Wrappers allow to obtain, copy and just keep alive bounds whrough widely use library calls. It significantly increases checking

Re: [PATCH, MPX wrappers 2/3] Replace some function calls with wrapper calls during instrumentation

2014-11-14 Thread Joseph Myers
On Fri, 14 Nov 2014, Ilya Enkovich wrote: * c-family/c.opt (fchkp-use-wrappers): New. Command-line options need documenting in invoke.texi. -- Joseph S. Myers jos...@codesourcery.com

Re: [PING][PATCH] c11-atomic-exec-5: Avoid dead code where LDBL_MANT_DIG is 106

2014-11-14 Thread Joseph Myers
On Fri, 14 Nov 2014, Maciej W. Rozycki wrote: Hi, This patch: http://gcc.gnu.org/ml/gcc-patches/2014-10/msg02540.html is still waiting, please review. OK. -- Joseph S. Myers jos...@codesourcery.com

Mention extended identifiers changes in gcc-5/changes.html

2014-11-14 Thread Joseph Myers
I've applied this patch to mention the extended identifiers changes in the GCC 5 release notes. Index: changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-5/changes.html,v retrieving revision 1.24 diff -u -r1.24 changes.html ---

Re: [C PATCH] warn for empty struct -Wc++-compat

2014-11-14 Thread Joseph Myers
On Wed, 12 Nov 2014, Prathamesh Kulkarni wrote: Is this version okay ? [gcc/c] * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc. Warn for empty struct. (finish_struct): Pass TREE_CODE (t) and loc to warn_cxx_compat_finish_struct.

Re: [PATCHv2] Fix minimal alignment calculation for user-aligned types (PR63802)

2014-11-17 Thread Joseph Myers
On Mon, 17 Nov 2014, Yury Gribov wrote: It looks like min_align_of_type is just too C11-specific to be usable in other contexts. Here is a patch which does what Jakub originally proposed (use TYPE_ALIGN_UNIT for user-aligned types, fallback to min_align_of_type otherwise). I think the

Re: [PATCH] Check 'fd' neither -1 nor 0, before close it

2014-11-17 Thread Joseph Myers
On Sat, 15 Nov 2014, Chen Gang wrote: Also in c_common_read_pch(), when failure occurs, also need be sure the 'fd' is not '-1' for the next close operation. Please clarify how c_common_read_pch gets called with fd == -1. Certainly checking after an error is too late; we shouldn't call fdopen

Re: [PATCH] driver: ignore SIGINT while waiting on subprocesses to finish

2014-11-17 Thread Joseph Myers
On Sat, 15 Nov 2014, Patrick Palka wrote: 1. if the top-level driver is waiting on a hanging subprocess, pressing ^C will kill the driver but it may not necessarily kill the subprocess; an unresponsive, perhaps busy-looping subprocess may be running in the background yet the compiler

Re: [PATCH] Fix minimal alignment calculation for user-aligned types (PR63802)

2014-11-17 Thread Joseph Myers
On Mon, 17 Nov 2014, Jakub Jelinek wrote: If it is true that a type satisfying TYPE_USER_ALIGN will never be allocated at an address less-aligned than its TYPE_ALIGN, even if that's greater than BIGGEST_ALIGNMENT, then the change seems correct for C11 _Alignof. I think it depends on

Re: [PATCH] Fix minimal alignment calculation for user-aligned types (PR63802)

2014-11-17 Thread Joseph Myers
On Mon, 17 Nov 2014, Jakub Jelinek wrote: The question, for both _Alignas and ubsan, is the alignment guaranteed *in valid programs*. malloc only provides sufficient alignment for types with fundamental alignment requirements (although there are various problems with the C11

Re: [PATCH, Pointer Bounds Checker, Builtins instrumentation 3/5] Expand instrumented builtin calls

2014-11-17 Thread Joseph Myers
On Mon, 17 Nov 2014, Ilya Enkovich wrote: I don't fully understand how this problem appears. Is it fully AIX specific and doesn't affect any other target? May we put all _CHKP codes to the end of enum and ignore them by AIX? Limiting number of It sounds to me like this is actually an AIX

Re: [PATCH, MPX wrappers 2/3] Replace some function calls with wrapper calls during instrumentation

2014-11-18 Thread Joseph Myers
On Tue, 18 Nov 2014, Ilya Enkovich wrote: +@item -fcheck-pointer-bounds +@opindex fcheck-pointer-bounds +@opindex fno-check-pointer-bounds +Enable Pointer Bounds Checker instrumentation. Each memory reference +is instrumented with checks of pointer used for memory access against +bounds

Re: [PATCH] gcc/c-family/c-cppbuiltin.c: Use 20 instead of 18 for the maximized 64-bits integer decimal string length

2014-11-18 Thread Joseph Myers
On Sun, 16 Nov 2014, Chen Gang wrote: The maximize 64-bits integer decimal string length excluding NUL is 20 ( '-9223372036854775808'), so need use 20 instead of 18 for HOST_WIDE_INT. 2014-11-16 Chen Gang gang.chen.5...@gmail.com * c-family/c-cppbuiltin.c

Re: [PATCH] gcc/c-family/c-cppbuiltin.c: Use 20 instead of 18 for the maximized 64-bits integer decimal string length

2014-11-19 Thread Joseph Myers
On Wed, 19 Nov 2014, Chen Gang wrote: OK, thanks, what you said sounds reasonable to me. We need '(' and ')' for negative members, and LL for the members which is larger than 32 bits. I don't think LL is a good idea when not needed - quite possibly some of the macros are expected or required

Re: [PATCH 18/21] PR jit/63854: Add long-term allocator to gcc::context

2014-11-19 Thread Joseph Myers
On Wed, 19 Nov 2014, David Malcolm wrote: There's no clean way to release them: retrofitting logic to decide if we're dealing with a string literal vs a dynamically-allocated buffer (and if something else is pointing to said buffer) is messy and error-prone; they are also unconnected to the

Re: [PATCH] gcc/c-family/c-cppbuiltin.c: Use 20 instead of 18 for the maximized 64-bits integer decimal string length

2014-11-20 Thread Joseph Myers
On Thu, 20 Nov 2014, Chen Gang wrote: OK, thanks. I guess your meaning is: - If the value is small enough to be expressed by type 'int', we should not provide 'LL'. Yes - and values not small enough should probably not be accepted by this function. - If the value is positive number,

Re: [PATCH, MPX runtime 1/2] Integrate MPX runtime library

2014-11-21 Thread Joseph Myers
On Fri, 21 Nov 2014, Ilya Enkovich wrote: +# Disable libmpx on unsupported systems. +if test -d ${srcdir}/libmpx; then +if test x$enable_libmpx = x; then + AC_MSG_CHECKING([for libmpx support]) + if (srcdir=${srcdir}/libmpx; \ + . ${srcdir}/configure.tgt; \ +

Re: [PATCH, MPX runtime 1/2] Integrate MPX runtime library

2014-11-21 Thread Joseph Myers
On Wed, 19 Nov 2014, Ilya Enkovich wrote: If it's intended only as the latter - and this is documented - then you don't have the libgcc-like requirements, and there's no point in having multiple libraries. If it's intended for both, that points the way to separate libraries (where the

Re: [PATCH, MPX wrappers 1/3] Add MPX wrappers library

2014-11-21 Thread Joseph Myers
On Fri, 21 Nov 2014, Ilya Enkovich wrote: * c-family/c.opt (static-libmpxwrappers): New. New options need documenting in invoke.texi. This includes driver options. diff --git a/libmpx/mpxwrap/mpx_wrappers.c b/libmpx/mpxwrap/mpx_wrappers.c new file mode 100644 index 000..bcff80f

Re: [RFC] First steps towards segregating types.

2014-11-21 Thread Joseph Myers
On Fri, 21 Nov 2014, Andrew MacLeod wrote: The biggest issue is what to do with fields which can be either a type or a tree... ie TREE_VALUE() of a TREE_LIST can be a type, as can a TREE_VEC element or a DECL_CONTEXT. I think the DECL_INITIAL field is overloaded and can sometimes be a

Re: [PATCH v2] gcc/c-family/c-cppbuiltin.c: Let buffer enough to print host wide integer value

2014-11-24 Thread Joseph Myers
On Sun, 23 Nov 2014, Chen Gang wrote: + gcc_assert (wi::fits_to_tree_p(value, integer_type_node)); Watch formatting: space before '(' in the wi::fits_to_tree_p call. Applies elsewhere in this patch as well. When making such an interface change, (a) you should update the comment on

Re: [RFC] First steps towards segregating types.

2014-11-24 Thread Joseph Myers
On Mon, 24 Nov 2014, Richard Biener wrote: TREE_LIST should die (with the typical replacement being vecsomething); most lists do not need all the overhead of individually allocated objects with (code, flags, type, chain, value, purpose). Probably TREE_VEC too. Note that there is nothing

Re: [C PATCH] Fix PR63877

2014-11-24 Thread Joseph Myers
On Mon, 24 Nov 2014, Marek Polacek wrote: This PR is basically the same as PR54113, except this time it's about -Wmissing-declarations and not about -Wmissing-prototypes. The problem here is that we were emitting bogus warning for a correct use of an inline function. Thus fixed in the same

Re: [PATCH v3] gcc/c-family/c-cppbuiltin.c: Let buffer enough to print host wide integer value

2014-11-25 Thread Joseph Myers
On Wed, 26 Nov 2014, Chen Gang wrote: + gcc_assert (wi::fits_to_tree_p (value, char_type_node) + || wi::fits_to_tree_p (value, short_integer_type_node) + || wi::fits_to_tree_p (value, integer_type_node) + || wi::fits_to_tree_p (value, long_integer_type_node) +

Re: [PATCH v3] gcc/c-family/c-cppbuiltin.c: Let buffer enough to print host wide integer value

2014-11-25 Thread Joseph Myers
On Wed, 26 Nov 2014, Chen Gang wrote: And I have no any ideas about the attachments in your reply mail. If it is really related with this thread, please let me know. I don't understand what attachments you are referring to. -- Joseph S. Myers jos...@codesourcery.com

Re: [C/C++ PATCH] Don't convert RHS of a shift-expression to int (PR c/63862)

2014-11-26 Thread Joseph Myers
On Wed, 26 Nov 2014, Marek Polacek wrote: Joseph, is that C FE part ok? The C changes are OK once Jakub's middle-end/expander issue is resolved (possibly by adding execution tests of shifts by in-range 64-bit and 128-bit integers, both constant and non-constant, and compilation tests of

Re: [PATCH v4] gcc/c-family/c-cppbuiltin.c: Let buffer enough to print host wide integer value

2014-11-26 Thread Joseph Myers
On Thu, 27 Nov 2014, Chen Gang wrote: The original length 18 is not enough for HOST_WIDE_INT printing, need use 20 instead of. Also need additional bytes for printing related prefix and suffix, and give a related check. It passes testsuite under fedora 20 x86_64-unknown-linux-gnu.

Re: [PATCH] FreeBSD arm support, EABI.

2014-11-03 Thread Joseph Myers
On Sun, 2 Nov 2014, Andreas Tobler wrote: * config/arm/arm.c (arm_init_libfuncs): FreeBSD does not support 8 byte atomics for __ARM_ARCH__ 6 yet. (arm_option_override): FreeBSD has not yet implemented unaligned access. The __FreeBSD__ conditionals in arm.c are incorrect.

Re: [AArch64, Docs, Patch] Add reference to ACLE in docs.

2014-11-03 Thread Joseph Myers
On Mon, 3 Nov 2014, Tejas Belagod wrote: If I mention in a couple of sentences the level of ACLE support there is in GCC currently, this section will need to be updated every time there is an improvement in ACLE support - I guess we'll just have to remember to remove parts of this section as

Re: [PATCH] FreeBSD arm support, EABI.

2014-11-03 Thread Joseph Myers
On Mon, 3 Nov 2014, Andreas Tobler wrote: The __FreeBSD__ conditionals in arm.c are incorrect. Those would test for FreeBSD *host*, but you need a conditional for FreeBSD *target* here. Ouch, yes. This I'd have to define via config/arm/freebsd.h, right? #define ARM_FREEBSD Yes,

Re: [PATCH][C-Family] Disable bogus shortening of DFP vs FP compare

2014-11-04 Thread Joseph Myers
On Tue, 4 Nov 2014, Richard Biener wrote: c-family/ * c-common.c (shorten_compare): Do not shorten mixed DFP and non-DFP compares. OK. I think it's also wrong for get_narrower to strip conversions between binary and decimal floating point at all, as all such conversions

Enable -fextended-identifiers by default

2014-11-05 Thread Joseph Myers
not take place inside raw string literals. Bootstrapped with no regressions on x86_64-unknown-linux-gnu. Applied to mainline. libcpp: 2014-11-05 Joseph Myers jos...@codesourcery.com PR preprocessor/9449 * init.c (lang_defaults): Enable extended identifiers for C++ and C99

Re: [PATCH] OpenACC for C++ front end

2014-11-05 Thread Joseph Myers
I think the TODO: XXX FIX -2 and TODO XXX: FIX -1 comments need, at least, more explanation of what the issue is and where the constants come from, even if something is left until later to be fixed. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH] PR36312

2014-11-05 Thread Joseph Myers
On Wed, 5 Nov 2014, Manuel López-Ibáñez wrote: Sorry for the breakage. I guess Anthony didn't configure with --enable-languages=all,ada. It is a typical mistake I have myself done in the past. Since the fix is not obvious to me and I'm not sure how much time Anthony would require to find a

Re: [PATCH\ Fix PR63750

2014-11-06 Thread Joseph Myers
On Thu, 6 Nov 2014, Jack Howarth wrote: 2014-10-06 Jack Howarth howarth.at@gmail.com PR other/63750 * gcc/ipa-chkp.c: Include sstream. Index: gcc/ipa-chkp.c === --- gcc/ipa-chkp.c(revision 217192) +++

Preserve original spellings of extended identifiers

2014-11-06 Thread Joseph Myers
.) Bootstrapped with no regressions on x86_64-unknown-linux-gnu. Applied to mainline. libcpp: 2014-11-06 Joseph Myers jos...@codesourcery.com * include/cpp-id-data.h (struct cpp_macro): Update comment regarding parameters. * include/cpplib.h (struct cpp_macro_arg, struct

Update c99status.html for extended identifiers changes

2014-11-06 Thread Joseph Myers
I've applied this patch to update c99status.html for the recent changes regarding extended identifiers. The remaining known C99/C11 conformance issues (beyond ordinary bugs) are all floating-point issues (mostly but not entirely Annex F/G). Index: c99status.html

Re: Update c99status.html for extended identifiers changes

2014-11-06 Thread Joseph Myers
On Thu, 6 Nov 2014, Marek Polacek wrote: On Thu, Nov 06, 2014 at 09:31:46PM +, Joseph Myers wrote: I've applied this patch to update c99status.html for the recent changes regarding extended identifiers. The remaining known C99/C11 conformance issues (beyond ordinary bugs) are all

Re: [PATCH v3] warning about const multidimensional array as function parameter

2014-11-06 Thread Joseph Myers
On Thu, 6 Nov 2014, Martin Uecker wrote: This patch implements a new proposed behaviour for pointers to arrays with qualifiers in C. I found some time to work on this again, so here is another revision. Main changes to the previous version of the patch: - add more test cases for cast

Re: [PATCH][RFC] Report pass we are ICEing in

2014-11-07 Thread Joseph Myers
On Fri, 7 Nov 2014, Richard Biener wrote: + if (current_pass current_pass-name) +inform (UNKNOWN_LOCATION, executing pass `%s', current_pass-name); %qs of course. -- Joseph S. Myers jos...@codesourcery.com

Re: [PR c/52952] More precise locations within format strings

2014-11-07 Thread Joseph Myers
On Fri, 7 Nov 2014, Manuel López-Ibáñez wrote: This patch allows format warnings to point within the format string for simple strings. There are a few limitations: * It does not handle 'const char *' because the location of the initializer is not available. The result is the same before and

Re: [PR c/52952] More precise locations within format strings

2014-11-07 Thread Joseph Myers
On Fri, 7 Nov 2014, Manuel López-Ibáñez wrote: Maybe I can open the file and re-parse the string to find the right column. Of course, this will not work when reading stdin, but in that case the behavior will be the same as currently. It will also allow me to gracefully degrade in the case of

Re: [PR c/52952] More precise locations within format strings

2014-11-10 Thread Joseph Myers
On Sat, 8 Nov 2014, Manuel López-Ibáñez wrote: On 7 November 2014 22:39, Joseph Myers jos...@codesourcery.com wrote: Neither Per nor Tom are active in GCC anymore. If the FE maintainers do not feel comfortable reviewing line-map changes, could you nominate Dodji as line-map maintainer

Re: [PATCH driver/36312] should refuse to overwrite input file with output file

2014-11-10 Thread Joseph Myers
On Sat, 8 Nov 2014, Manuel López-Ibáñez wrote: This patch is a minor variant of the one approved here: https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00246.html fixing the problem with linker parameters (which are stored in infiles).

Re: [RFC, C] add warning for unpromoted bit-field uses

2014-11-10 Thread Joseph Myers
On Sat, 8 Nov 2014, Sandra Loosemore wrote: I thought that the point at which integral promotions are applied would be a good place to catch this, as it excludes places where bit-fields are already being converted by assignment or explicit cast. I think we also want to Formally of course

Re: [RFC, C] add warning for unpromoted bit-field uses

2014-11-10 Thread Joseph Myers
On Sun, 9 Nov 2014, Sandra Loosemore wrote: Hrmmm. In C, sp-a has type 3-bit unsigned integer which is promoted to int by the integral promotions since all values are representable as int. sp-c has type 5-bit unsigned integer which is likewise promoted to int. In C++, sp-a has type

Re: [patch testsuite gcc.dg]: Turn of ms-extensions for mingw target

2014-11-28 Thread Joseph Myers
On Fri, 28 Nov 2014, Kai Tietz wrote: Hi, this patch turns off ms-extensions for mingw-targets to match diagnostics checked in testcases. Ok for apply? For the tests using -std=some ISO standard -pedantic (or -pedantic-errors), are you saying the diagnostics are *different*, or that

Re: [patch testsuite gcc.dg]: Turn of ms-extensions for mingw target

2014-11-28 Thread Joseph Myers
On Fri, 28 Nov 2014, Kai Tietz wrote: Some diagnostics are different and some constructs getting allowed with enabled ms-extensions flag. Additionally is the pedantic-flag not automatically set for *-*-mingw* targets. So for enforcing ISO-C++ pedantic checks the *-*-mingw* targets need to

Re: [patch testsuite gcc.dg]: Turn of ms-extensions for mingw target

2014-11-28 Thread Joseph Myers
On Fri, 28 Nov 2014, Kai Tietz wrote: 2014-11-28 19:10 GMT+01:00 Joseph Myers jos...@codesourcery.com: On Fri, 28 Nov 2014, Kai Tietz wrote: Some diagnostics are different and some constructs getting allowed with enabled ms-extensions flag. Additionally is the pedantic-flag

Re: [Patch, option handling] optc-gen.awk - support || in EnabledBy()

2014-11-28 Thread Joseph Myers
On Sun, 23 Nov 2014, Tobias Burnus wrote: Build on x86-64-gnu-linux with checking that the resulting options.c remains the same. OK for the trunk? OK. -- Joseph S. Myers jos...@codesourcery.com

Re: Fwd: g++ off-by-one bug in utf16 conversion

2014-11-28 Thread Joseph Myers
. gcc/testsuite: 2014-11-29 Joseph Myers jos...@codesourcery.com PR preprocessor/41698 * gcc/testsuite/g++.dg/cpp/utf16-pr41698-1.C: New test. Index: gcc/testsuite/g++.dg/cpp/utf16-pr41698-1.C === --- gcc/testsuite/g

Re: [PATCH] Fix PR15346

2014-12-01 Thread Joseph Myers
On Mon, 1 Dec 2014, Richard Biener wrote: +/* Combine two successive divisions. */ +(for div (trunc_div ceil_div floor_div round_div exact_div) This doesn't seem correct for all kinds of division and signedness of arguments. TRUNC_DIV_EXPR (C division) and EXACT_DIV_EXPR should be OK

Re: [PATCH, MPX wrappers 1/3] Add MPX wrappers library

2014-12-01 Thread Joseph Myers
On Mon, 1 Dec 2014, Jeff Law wrote: diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index 8f5d76c..283c632 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -1043,6 +1043,9 @@ Instrument only functions marked with bnd_instrument attribute. static-libmpx Driver

Re: [PATCH] Fix PR15346

2014-12-02 Thread Joseph Myers
On Tue, 2 Dec 2014, Richard Biener wrote: I'm not sure if these forms of division actually occur in places where this could cause a problem, but it does look like Ada may enable you to generate ROUND_DIV_EXPR. Hmm. I thought I was following what extract_muldiv_1 does (but of course

Re: [PATCH] Fix PR15346

2014-12-02 Thread Joseph Myers
On Tue, 2 Dec 2014, Joseph Myers wrote: (y), 1)) is not the right condition for rounding away). The following Ada testcase test_round_div.adb will generate a ROUND_DIV_EXPR which is I should add that I'm not sure if Ada requires correct rounding for fixed-point division converted

Re: [testsuite] Fix multiple definitions of _init

2014-12-02 Thread Joseph Myers
On Tue, 2 Dec 2014, Richard Biener wrote: Joseph may have more experience with how targets should setup USER_LABEL_PREFIX to avoid this situation. See e.g. config/arm/lib1funcs.S: #define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x) (and the associated macro definition of CONCAT1 that uses,

Re: [PATCH driver/diagnostics] init color earlier, add color to driver

2014-12-02 Thread Joseph Myers
On Tue, 2 Dec 2014, Manuel López-Ibáñez wrote: 2014-12-02 Manuel López-Ibáñez m...@gcc.gnu.org * diagnostic.c (diagnostic_color_init): New. * diagnostic.h: Declare. * gcc.c (driver::global_initializations): Use it. (driver_handle_option): Handle -fdiagnostics-color_.

Re: [PATCH v4] warning about const multidimensional array as function parameter

2014-12-03 Thread Joseph Myers
On Mon, 10 Nov 2014, Martin Uecker wrote: + if (OPT_Wdiscarded_array_qualifiers OPT_Wdiscarded_array_qualifiers is an enum constant, so it doesn't make sense to test it in if conditions like this. You don't need a test in the if condition for whether the warning is enabled - passing

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-04 Thread Joseph Myers
On Thu, 4 Dec 2014, Richard Biener wrote: Currently even when I prototype double exp10 (double); this function is not available to optimizers for code generation if they just check for builtin_decl_implicit (BUILT_IN_EXP10). Curiously though the function is identified as BUILT_IN_EXP10

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-04 Thread Joseph Myers
On Thu, 4 Dec 2014, Richard Biener wrote: So what does this all mean in practice for optimization passes? I don't know what it means in terms of how to fix the various existing problems - it's simply how I think a fixed compiler should behave. When b) does not apply then the given stpcpy

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-04 Thread Joseph Myers
On Thu, 4 Dec 2014, Richard Biener wrote: OTOH this also means the user cannot provide a conforming implementation on his own and get that used by GCC without editing system headers or including a header with -isystem or similar tricks. Well - you could have a pragma / attribute for that

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-08 Thread Joseph Myers
On Mon, 8 Dec 2014, Richard Biener wrote: I'm not pushing this further for stage3, but for stage1 I'd like to eventually address this by splitting up builtin_info_type's 'implicit_p' into a flags array providing implicit_p, declared_p, used_p and maybe declared_in_system_header_p. Would you

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-08 Thread Joseph Myers
On Mon, 8 Dec 2014, Richard Biener wrote: The alternative is to decide used in the middle-end at one point, for example at the end of all_lowering_passes where hopefully we have constant folded and removed dead code enough. We can also compute an overall uses libm flag to fix the testcase I

Re: [PATCH, libcpp]: Check the result of vasprintf

2014-12-09 Thread Joseph Myers
On Tue, 9 Dec 2014, Uros Bizjak wrote: Attached patch checks the return value and sets ptr to NULL in this case. 2014-12-09 Uros Bizjak ubiz...@gmail.com * directives.c (cpp_define_formatted): Check return value of vasprintf and in case of error set ptr to NULL. Bootstrapped

Re: [PATCH, libiberty, libcpp]: Introduce xvasprintf to libiberty and use it in libcpp

2014-12-10 Thread Joseph Myers
On Wed, 10 Dec 2014, Uros Bizjak wrote: libcpp/ChangeLog: 2014-12-10 Uros Bizjak ubiz...@gmail.com * directives.c (cpp_define_formatted): Use xvasprintf. The libcpp patch is OK once the libiberty patch is in. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH 2/4] Add Visium support to libgcc

2014-12-11 Thread Joseph Myers
Do you have a reason for using fp-bit instead of soft-fp? libgcc files are generally GPL+exception, not LGPL without exception with a very old FSF address (config/visium/div64.c, mod64.c, set_trampoline_parity.c, udiv64.c, udivmod64.c, umod64.c) -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH 3/4] Add Visium support to gcc

2014-12-11 Thread Joseph Myers
Use of `%s' in diagnostics is long obsoleted by %qs (in this case, using %qE with the identifier directly, rather than using IDENTIFIER_POINTER, is preferred). INTVAL / UINTVAL return HOST_WIDE_INT / unsigned HOST_WIDE_INT, not long / unsigned long. You have lots of uses of fprintf that

Re: [PATCH] Fix -fsanitize=float-cast-overflow with C FE (PR sanitizer/64289)

2014-12-16 Thread Joseph Myers
On Fri, 12 Dec 2014, Jakub Jelinek wrote: Hi! -fsanitize=float-cast-overflow sanitization is done in convert.c and calls there save_expr. Unfortunately, save_expr is a no-go for the C FE, we need c_save_expr, but as convert.c is shared by all FEs, the only way to arrange that would be a

Re: PING for gcc/flag-types.h (was: Re: [Patch, gcc/flag-types.h + Fortran] PR54687 - Fortran options cleanup)

2014-12-16 Thread Joseph Myers
On Mon, 15 Dec 2014, Tobias Burnus wrote: The Fortran part of the .opt changes has been approved, but for Enum(), some bits had to be moved to gcc/flag-types.h – and review for that file is still missing. https://gcc.gnu.org/ml/gcc-patches/2014-12/msg01068.html The flag-types.h changes are

Re: [PATCH 2/4] Add Visium support to libgcc

2014-12-16 Thread Joseph Myers
On Mon, 15 Dec 2014, Eric Botcazou wrote: Do you have a reason for using fp-bit instead of soft-fp? Apart from the obvious historical reason, probably not, but recently added ports (Blackfin, Epiphany) also use it so I'm not sure we want to change it. I doubt they have any good reason for

Re: [PATCH 3/4] Add Visium support to gcc

2014-12-16 Thread Joseph Myers
On Mon, 15 Dec 2014, Eric Botcazou wrote: (and you should verify that the port builds cleanly with --enable-werror -always, for both 32-bit and 64-bit hosts, when building using current trunk GCC). Do you mean a bootstrap of the cross-compiler with --enable-werror-always on a

Re: [PATCH][AArch64] Implement vsqrt_f64 intrinsic

2014-12-16 Thread Joseph Myers
On Mon, 15 Dec 2014, James Greenhalgh wrote: @@ -22792,6 +22792,12 @@ vsqrtq_f32 (float32x4_t a) return __builtin_aarch64_sqrtv4sf (a); } +__extension__ static __inline float64x1_t __attribute__ ((__always_inline__)) +vsqrt_f64 (float64x1_t a) +{ + return (float64x1_t) {

Re: [PATCH][ARM]Fix __ARM_SIZEOF_WCHAR_T definition.

2014-12-16 Thread Joseph Myers
On Tue, 16 Dec 2014, Renlin Li wrote: Hi all, According to ACLE 2.0, the value of __ARM_SIZEOF_WCHAR_T should be defined in terms of byte, which means it should be 2 or 4. This patch corrects the error in arm backend. What error? builtin_define_type_sizeof does define a size in bytes (it

Re: [PATCH][AArch64] Implement vsqrt_f64 intrinsic

2014-12-18 Thread Joseph Myers
On Thu, 18 Dec 2014, Kyrill Tkachov wrote: I see that there are some intrinsics implemented in terms of __builtin_fabsf, presumable they can be at 'risk' too of having a library call emitted? The semantics of fabsf/fabs/fabsl are to clear the sign bit, never raise any exceptions (even for

Re: [PATCH] Fix -fsanitize=float-cast-overflow with C FE (PR sanitizer/64344)

2014-12-18 Thread Joseph Myers
On Thu, 18 Dec 2014, Jakub Jelinek wrote: c/ * c-typeck.c (convert_for_assignment, c_finish_return): For -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum types also set in_late_binary_op around convert call. * c-convert.c (convert): For

Re: [PATCH v5] warning about const multidimensional array as function parameter

2014-12-19 Thread Joseph Myers
On Mon, 8 Dec 2014, Martin Uecker wrote: Another version of this patch. I fixed the formatting problems and the spurios use of OPT_Wdiscarded_array_qualifiers. I also added '-pedantic -Wdiscarded-array-qualifiers' to the dg-options in 'testsuite/gcc.dg/qual-component-1.c' and changed the

Re: [PATCH] toplev.c: Process the failure when read fails for random_seed

2014-12-30 Thread Joseph Myers
On Mon, 29 Dec 2014, Chen Gang S wrote: 2014-12-27 Chen Gang gang.chen.5...@gmail.com * toplev.c (init_local_tick): Process the failure when read fails for random_seed. OK. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH] toplev.c: Process the failure when read fails for random_seed

2014-12-30 Thread Joseph Myers
On Mon, 29 Dec 2014, Chen Gang S wrote: And in honest, this year what I have done is really not quite well, next year I should be improved: should scanning Bugzilla and try to fix the existing issues (just like another members' suggestions to me). Note that for any substantial patches you'll

Re: [doc, committed] copy-edit documentation for -fisolate-erroneous-paths-*

2015-01-26 Thread Joseph Myers
On Mon, 26 Jan 2015, Gerald Pfeifer wrote: On Saturday 2015-01-03 17:59, Sandra Loosemore wrote: * most places in the manual use null or more rarely @code{NULL} rather than NULL So, should this be documented in gcc.gnu.org/codingconventions.html? Expanding / revising where it says NULL

Re: [PATCH, c] PR c/48956: diagnostics for conversions involving complex types

2015-01-30 Thread Joseph Myers
On Fri, 30 Jan 2015, Mikhail Maltsev wrote: On Fri, 30 Jan 2015 00:15:02 + Joseph Myers jos...@codesourcery.com wrote: +#if 0 + /* Check needs to be implemented. */ + fuic (-1. + 0.i); + vuic = -1. + 0.i; +#endif The #if 0 cases should have a bug filed in Bugzilla

Re: #pragma GCC unroll support

2015-01-30 Thread Joseph Myers
On Thu, 29 Jan 2015, Mike Stump wrote: @@ -5587,6 +5600,12 @@ c_parser_for_statement (c_parser *parser %GCC ivdep% pragma); cond = error_mark_node; } + else if (unroll) + { + c_parser_error

Re: [RFC][PR target/39726 P4 regression] match.pd pattern to do type narrowing

2015-02-02 Thread Joseph Myers
On Sat, 31 Jan 2015, Jeff Law wrote: The nice thing about wrapping the result inside a convert is the types for the inner operations will propagate from the type of the inner operands, which is exactly what we want. We then remove the hack assigning type and instead the original type will be

  1   2   3   4   5   6   7   8   9   10   >