[Bug c++/88362] attribute aligned silently ignored on C++ references

2018-12-05 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88362 --- Comment #6 from joseph at codesourcery dot com --- On Wed, 5 Dec 2018, msebor at gcc dot gnu.org wrote: > so that we get consistent behavior for reference members. __alignof__ should > return the corresponding alignment. For e

[Bug c++/88362] attribute aligned silently ignored on C++ references

2018-12-05 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88362 --- Comment #4 from joseph at codesourcery dot com --- It's not very clear to me what an aligned attribute on a reference, or a check of the alignment of a reference, should mean anyway. Note that in some places, [[]]-style attributes

[Bug driver/88262] gcc uses crt1.o in place of Scrt1.o when the main function is in a PIC shared lib

2018-11-30 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88262 --- Comment #8 from joseph at codesourcery dot com --- On Fri, 30 Nov 2018, stephen.kim at oracle dot com wrote: > The glibc commit that triggered this bug is: > bfff8b1becd7d01c074177df7196ab327cd8c844 That's the copyright date u

[Bug c/88270] -Wformat-XXX option for flagging %m

2018-11-29 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88270 --- Comment #6 from joseph at codesourcery dot com --- A format attribute for syslog is bug 15338. (A fully general system for extensible format checking is hard, as I think it would be a bad idea for it effectively to turn the internals

[Bug c/88270] -Wformat-XXX option for flagging %m

2018-11-29 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88270 --- Comment #2 from joseph at codesourcery dot com --- The -Wformat -Wpedantic comment should warn for nonstandard formats - but would do so for all format functions, not a subset. And while we have separate printf and gnu_printf arguments

[Bug driver/88262] gcc uses crt1.o in place of Scrt1.o when the main function is in a PIC shared lib

2018-11-29 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88262 --- Comment #3 from joseph at codesourcery dot com --- As of October 2017, glibc has a testcase that having main in a shared library works - that's a valid use case, which should work with crt1.o. If it doesn't work for some particular

[Bug tree-optimization/88223] [8 Regression] Wrong code for intrinsic memmove

2018-11-29 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88223 --- Comment #12 from joseph at codesourcery dot com --- This seems a reasonable enough example for punning to me, given that all accesses are via the union type.

[Bug tree-optimization/88223] [8 Regression] Wrong code for intrinsic memmove

2018-11-28 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88223 --- Comment #10 from joseph at codesourcery dot com --- On Wed, 28 Nov 2018, rguenth at gcc dot gnu.org wrote: > Hmm, OTOH the C standard specifies that the store to u.b.b makes it the > u.b the active member and it makes the old co

[Bug tree-optimization/88240] Potential optimization bug: invalid pre-load of floating-point value could cause SIGFPE-underflow if value is integer

2018-11-28 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88240 --- Comment #7 from joseph at codesourcery dot com --- As discussed, the load instructions should never raise underflow exceptions, and having traps enabled for the nonstandard denormal operand exception is clearly outside the scope of what

[Bug other/16615] throughout gcc docu and code numerous "can not"'s appear

2018-11-26 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16615 --- Comment #9 from joseph at codesourcery dot com --- I'd suggest reviewing the set of files changed to see if any are generated files, or their sources (configure.ac, aclocal.m4, etc.), and doing a regeneration in that case.

[Bug other/54265] Documentation of "preferred attribute syntax for Types" contradicts examples in info.

2018-11-23 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54265 --- Comment #2 from joseph at codesourcery dot com --- The earlier position is preferred because logically at the closing brace the type should be fully defined and it should no longer be possible to change properties of it through attributes

[Bug c++/88173] `std::numeric_limits::quiet_NaN()` is not constexpr

2018-11-23 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88173 --- Comment #4 from joseph at codesourcery dot com --- An ordered comparison (< <= > >=) with qNaN raises the "invalid" exception. An equality comparison (== !=) does not, and nor do __builtin_isless etc. I don't know h

[Bug c/88144] remove long-obsolete syntax for designated initializers

2018-11-22 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88144 --- Comment #4 from joseph at codesourcery dot com --- On Thu, 22 Nov 2018, pinskia at gcc dot gnu.org wrote: > I think one of the reasons why it has not been removed is there is still code > out there that uses this syntax. Including

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-21 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #23 from joseph at codesourcery dot com --- And, yes, at least one extra bit in emin is needed for that sticky rounding code to work (because the user's source code may have a decimal constant that is slightly over half the least

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-21 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #22 from joseph at codesourcery dot com --- On Wed, 21 Nov 2018, rguenther at suse dot de wrote: > /* Nonzero value, possibly overflowing or underflowing. */ > mpfr_init2 (m, SIGNIFICAND_BITS); >

[Bug middle-end/88097] Missing optimization of endian conversion

2018-11-20 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88097 --- Comment #5 from joseph at codesourcery dot com --- As of glibc 2.28, glibc uses __builtin_bswap* when available on all architectures. commit 0d40d0ecba3b1e5b8c3b8da01c708fea3948e193 Author: Joseph Myers Date: Tue Feb 6 21:55:08 2018

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-20 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #19 from joseph at codesourcery dot com --- On Tue, 20 Nov 2018, rguenth at gcc dot gnu.org wrote: > if (fmt->emin < min_exp) > min_exp = fmt->emin - fmt->p + 1; > so somehow

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-19 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #13 from joseph at codesourcery dot com --- MPFR deals with larger exponent ranges for intermediate computations itself (MPFR functions generally set the maximum possible exponent range internally). MPC generally doesn't seem

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-19 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #12 from joseph at codesourcery dot com --- Note that such issues are not unique to ctan. E.g., compiling __builtin_jn (10, 1e10) will produce such a hang. The difference is that in the ctan case the additional algorithm

[Bug d/88039] gdc.test/compilable/ddoc12.d FAILs

2018-11-19 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88039 --- Comment #3 from joseph at codesourcery dot com --- On Mon, 19 Nov 2018, ro at CeBiTec dot Uni-Bielefeld.DE wrote: > However, there's another option: C11, 6.4.2.1 General, n.71 suggests > > On systems in which linkers cannot accept

[Bug other/16615] throughout gcc docu and code numerous "can not"'s appear

2018-11-19 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16615 --- Comment #7 from joseph at codesourcery dot com --- Note there are a few places where it's "cannot", which the most obvious find/sed might not locate. E.g. in lra-remat.c: /* Map: insn -> candidate representing it. It is nul

[Bug tree-optimization/68235] gimple optimisations always use global -fmath-errno setting

2018-11-19 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68235 --- Comment #4 from joseph at codesourcery dot com --- I'm not aware of any fix for this bug (the only commit shown is a change to testcase options, not a fix).

[Bug target/58684] powerpc uses only unordered floating-point compares

2018-11-19 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58684 --- Comment #8 from joseph at codesourcery dot com --- I see no sign of Segher's patch to fix the bug (as opposed to some XFAILs pending a fix) having been committed, and a trivial testcase still generates fcmpu instructions with a compiler

[Bug c/88062] tgmath with fadd vs faddl done wrong

2018-11-16 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88062 --- Comment #1 from joseph at codesourcery dot com --- This is not a GCC bug. tgmath.h is provided by glibc, not GCC, and glibc indeed does not yet include the type-generic macros for functions rounding to a narrower type (nor does glibc yet

[Bug go/88060] ../../../gcc-8.2.0/libgo/go/syscall/libcall_linux_utimesnano.go:17:18: error: reference to undefined name ‘_AT_FDCWD’

2018-11-16 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88060 --- Comment #5 from joseph at codesourcery dot com --- AT_FDCWD was added in glibc 2.4, released 2006-03-06.

[Bug driver/87769] GCC build from source uses headers and libraries from directories host machine.

2018-11-12 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87769 --- Comment #6 from joseph at codesourcery dot com --- If you want the modern process for building a cross toolchain for a GNU/Linux (or GNU/Hurd) target, look at how glibc's build-many-glibcs.py does it. (This is not saying you need to use

[Bug c/87879] -Wformat-nonliteral could see more things as literals

2018-11-05 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87879 --- Comment #1 from joseph at codesourcery dot com --- You'd need dataflow information that's not available at that point in the front end to know that the initializer is indeed the value of fmt at that point in the code.

[Bug tree-optimization/83353] Missed optimization in math expression: sin(asin(a)) == a

2018-11-02 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83353 --- Comment #5 from joseph at codesourcery dot com --- asin(sin(a)) is not safe (or at least not simple) because of arguments outside [-pi/2, pi/2]. sin(asin(a)) is more appropriate with -ffast-math because arguments outside [-1,1

[Bug target/40503] DEC_EVAL_METHOD not match operators

2018-11-02 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40503 --- Comment #10 from joseph at codesourcery dot com --- I was not attempting to confirm that GCC had a particular bug. In this case: as I said, no excess precision support is hooked up for decimal floating point (i.e., whatever the back end

[Bug driver/87769] GCC build from source uses headers and libraries from directories host machine.

2018-10-30 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87769 --- Comment #3 from joseph at codesourcery dot com --- On Tue, 30 Oct 2018, mte.zych at gmail dot com wrote: > ../gcc-source/configure --build=x86_64-linux-gnu \ > --host=x86_64-lin

[Bug c/71613] Useful warnings silenced when macros from system headers are used

2018-10-29 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71613 --- Comment #9 from joseph at codesourcery dot com --- On Mon, 29 Oct 2018, egallager at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71613 > > --- Comment #8 from Eric Gallager --- > (In

[Bug bootstrap/87741] Don't build readline/libreadline.a in GDB, when --with-system-readline is supplied

2018-10-26 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87741 --- Comment #5 from joseph at codesourcery dot com --- Send email issues to postmas...@sourceware.org (not overseers, that's another mailing list on the same server).

[Bug c++/87736] New attributes to mark custom alloc/free function pair

2018-10-24 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87736 --- Comment #1 from joseph at codesourcery dot com --- Note that you can have a custom malloc function (e.g. xmalloc) that pairs with standard free, so it should be possible to indicate that.

[Bug c/60440] Bogus -Wreturn-type warning after error

2018-10-19 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60440 --- Comment #9 from joseph at codesourcery dot com --- I think it would be appropriate for the front end to generate something for return ; that avoids this warning. I don't know whether that should be a literal return of error_mark_node

[Bug c/60440] Bogus -Wreturn-type warning after error

2018-10-19 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60440 --- Comment #7 from joseph at codesourcery dot com --- If CC:ing me on a bug, please always state the specific question on which you want an opinion; don't CC me simply because I maintain the relevant part of the compiler (I read gcc-bugs

[Bug middle-end/87593] conflicting format_arg attributes on a declaration accepted

2018-10-11 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87593 --- Comment #1 from joseph at codesourcery dot com --- Supporting format_arg for multiple arguments of a function isn't a mistake or counter-intuitive at all. A correct declaration of the ngettext function requires more than one format_arg

[Bug preprocessor/83256] inconsistent _Pragma behavior in multi-line macros

2018-10-09 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83256 --- Comment #3 from joseph at codesourcery dot com --- Unless someone can identify a commit that deliberately fixed the bug *and added appropriate tests to the testsuite*, I'd strongly advise adding tests to the testsuite before marking FIXED

[Bug c/87482] Clarify behaviour of resolvers with parameters in for __attribute__((ifunc))

2018-10-01 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87482 --- Comment #3 from joseph at codesourcery dot com --- I expect it's valid to use (void) if that particular IFUNC resolver doesn't use the HWCAP information passed, even if the HWCAP information is passed to resolvers on that architecture

[Bug c/87482] Clarify behaviour of resolvers with parameters in for __attribute__((ifunc))

2018-10-01 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87482 --- Comment #1 from joseph at codesourcery dot com --- Yes, on some platforms the resolver takes the HWCAP as an argument and so should be declared as a function taking that argument (if it uses it, anyway).

[Bug c/87390] [x86 32bit only] GCC does not honor FLT_EVAL_METHOD on implicit conversion of integer to floating point

2018-09-27 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87390 --- Comment #26 from joseph at codesourcery dot com --- On Thu, 27 Sep 2018, vincent-gcc at vinc17 dot net wrote: > > The interpretation of C99 rules for excess precision used in GCC has been > > explained at length from

[Bug c/87390] [x86 32bit only] GCC does not honor FLT_EVAL_METHOD on implicit conversion of integer to floating point

2018-09-26 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87390 --- Comment #22 from joseph at codesourcery dot com --- 6.3.1.8 specifies *types*. It only gives some partial information about *evaluation formats*, which is essentially a consequence of information elsewhere (it states the possibility

[Bug c/87390] [x86 32bit only] GCC does not honor FLT_EVAL_METHOD on implicit conversion of integer to floating point

2018-09-26 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87390 --- Comment #20 from joseph at codesourcery dot com --- I think the statement in 6.3.1.8 is only observing a consequence of specifications elsewhere, and stating that this excess range and precision does not affect semantic types; it does

[Bug c/87390] [x86 32bit only] GCC does not honor FLT_EVAL_METHOD on implicit conversion of integer to floating point

2018-09-26 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87390 --- Comment #19 from joseph at codesourcery dot com --- On Wed, 26 Sep 2018, vincent-gcc at vinc17 dot net wrote: > 6.3.1.5p2 is only about explicit conversions and function calls (otherwise, > types are not demoted magically). But

[Bug c/87390] [x86 32bit only] GCC does not honor FLT_EVAL_METHOD on implicit conversion of integer to floating point

2018-09-26 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87390 --- Comment #16 from joseph at codesourcery dot com --- On Wed, 26 Sep 2018, vincent-gcc at vinc17 dot net wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87390 > > --- Comment #14 from Vincent Lefèvre --- > (In

[Bug c/87390] [x86 32bit only] GCC does not honor FLT_EVAL_METHOD on implicit conversion of integer to floating point

2018-09-26 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87390 --- Comment #13 from joseph at codesourcery dot com --- On Wed, 26 Sep 2018, vincent-gcc at vinc17 dot net wrote: > But there are no differences with 6.3.1.4 (when converting to a floating > type): > in both cases, either the

[Bug c/87390] [x86 32bit only] GCC does not honor FLT_EVAL_METHOD on implicit conversion of integer to floating point

2018-09-26 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87390 --- Comment #9 from joseph at codesourcery dot com --- On Wed, 26 Sep 2018, vincent-gcc at vinc17 dot net wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87390 > > --- Comment #8 from Vincent Lefèvre --- > (In

[Bug c/87390] [x86 32bit only] GCC does not honor FLT_EVAL_METHOD on implicit conversion of integer to floating point

2018-09-26 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87390 --- Comment #7 from joseph at codesourcery dot com --- On Wed, 26 Sep 2018, vincent-gcc at vinc17 dot net wrote: > > It's 6.3.1.4 for conversions between real floating and integer types that, > > in C99 but not C11, I th

[Bug c/87390] [x86 32bit only] GCC does not honor FLT_EVAL_METHOD on implicit conversion of integer to floating point

2018-09-26 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87390 --- Comment #5 from joseph at codesourcery dot com --- It's 6.3.1.4 for conversions between real floating and integer types that, in C99 but not C11, I think requires the resulting value to be representable in the resulting real floating type.

[Bug c/87392] UBSAN behavior on left-shifting 1 into the sign bit is dependent on C standard

2018-09-25 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87392 --- Comment #7 from joseph at codesourcery dot com --- The implementation-definedness of signed left shift in C90, including shifting into or past the sign bit (as long as the shift count isn't too large or negative), is stated explicitly

[Bug c/87390] [x86 32bit only] GCC does not honor FLT_EVAL_METHOD on implicit conversion of integer to floating point

2018-09-25 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87390 --- Comment #3 from joseph at codesourcery dot com --- I believe this is correct for C99 (see the discussions in bug 82071): my reading of C99 is that conversions of integers to floating point, both explicit and implicit, produce results

[Bug middle-end/87363] Duplicate and bogus -Wstringop-overflow warning

2018-09-19 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87363 --- Comment #4 from joseph at codesourcery dot com --- I think the *member* of the union here (the one that is active after the initialization) is the anonymous struct containing x and y. That would surely be the case if you named the two

[Bug middle-end/87363] Duplicate and bogus -Wstringop-overflow warning

2018-09-19 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87363 --- Comment #2 from joseph at codesourcery dot com --- On Wed, 19 Sep 2018, msebor at gcc dot gnu.org wrote: > Other than that, since > > When a value is stored in a member of an object of union type, the bytes of > the object re

[Bug c/68524] Please support attributes between function definition and opening brace

2018-09-14 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68524 --- Comment #2 from joseph at codesourcery dot com --- I believe the syntax in N2269 does allow [[]] attributes there (and disallows them as prefixes on old-style parameters to avoid ambiguity) - but they appertain to the function type

[Bug tree-optimization/87303] DFmode FP constants are not correctly truncated when promoted to XFmode

2018-09-14 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87303 --- Comment #2 from joseph at codesourcery dot com --- I don't see a bug here. Excess precision semantics mean that the comparison is effectively with 0.1e-100L (whereas the array initializer is (double) 0.1e-100L). If you use "!= (d

[Bug bootstrap/87030] GCC fails to build with Xcode 10, attempting an impossible multilib build

2018-09-10 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87030 --- Comment #9 from joseph at codesourcery dot com --- On Sat, 8 Sep 2018, iains at gcc dot gnu.org wrote: > 2. Actually, you get the same failure on GNU-Linux if you try to configure > defaults on (for example) an x86_64 system without

[Bug middle-end/87247] intrinsic acosh violates 2008 Standard rule 13.7.5 line 5

2018-09-07 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87247 --- Comment #4 from joseph at codesourcery dot com --- The standard branch cut for acosh (not just a C standard, but as at https://dlmf.nist.gov/4.37 for example) follows from the principles that (a) acosh(conj(x)) = conj(acosh(x)) and (b

[Bug other/87220] -fstack-check produces inefficient and wrong tests

2018-09-04 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87220 --- Comment #1 from joseph at codesourcery dot com --- What does -fstack-clash-protection give? (-fstack-check is an old option for specific Ada requirements; for proper stack-clash protection for all languages you want -fstack-clash

[Bug c/87210] [RFE] introduce build time options to zero initialize automatic stack variables

2018-09-03 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87210 --- Comment #2 from joseph at codesourcery dot com --- On Mon, 3 Sep 2018, pjp at fedoraproject dot org wrote: > As from the reply, it would be nice to have four options/features available > from the compiler, from least to most perfo

[Bug libquadmath/87204] strtoflt128 produces different results for subnormals with -m32 and -m64

2018-09-03 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87204 --- Comment #1 from joseph at codesourcery dot com --- There are lots of glibc strtod fixes that postdate the last merges of strtod code to libquadmath. I don't know if any of them are relevant to this issue, but merging in those fixes would

[Bug libbacktrace/87182] libbacktrace does not use GCC own zlib

2018-09-03 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87182 --- Comment #3 from joseph at codesourcery dot com --- Host libbacktrace would need to use GCC's host zlib and target libbacktrace would need to use GCC's target zlib for the same target multilib (which would require appropriate dependencies

[Bug tree-optimization/57492] Optimize 2.0**i to ldexp(1.0,i)

2018-08-27 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57492 --- Comment #5 from joseph at codesourcery dot com --- The example from comment#2 should require -funsafe-math-optimizations (it's not correct if the pow call overflowed / underflowed but the ldexp call doesn't).

[Bug web/87050] Bump wwwdocs to html5

2018-08-24 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87050 --- Comment #6 from joseph at codesourcery dot com --- A replacement for MetaHTML is already available, we just need to switch to using it. https://gcc.gnu.org/ml/gcc-patches/2018-06/msg00176.html

[Bug c/87038] diagnostics: Please add warning for jumping over initializers with switch/case in C mode

2018-08-21 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87038 --- Comment #3 from joseph at codesourcery dot com --- This is Wjump-misses-init. Is this a request to make some other option such as -Wall or -Wextra enable that option (rather than just -Wc++-compat as at present)?

[Bug c/63303] Pointer subtraction is broken when using -fsanitize=undefined

2018-08-21 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63303 --- Comment #18 from joseph at codesourcery dot com --- On Tue, 21 Aug 2018, jvg1981 at aim dot com wrote: > intptr_t pVal = ((uintptr_t) p)/(sizeof *p); > intptr_t qVal = ((uintptr_t) q)/(sizeof *q); Note that this can be ex

[Bug middle-end/86968] Unaligned big-endian (scalar_storage_order) access on armv7-a yields 4 ldrb instructions rather than ldr+rev

2018-08-16 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86968 --- Comment #4 from joseph at codesourcery dot com --- Any unaligned access things that don't work for big-endian ARM are probably fallout from the issues with big-endian NEON (NEON architectural lane numbers are different from

[Bug c/86923] Missed optimization performing consecutive integer sum, loop not removed

2018-08-13 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86923 --- Comment #1 from joseph at codesourcery dot com --- Isn't this bug 65855?

[Bug other/86857] configure sprintf with target-specific details

2018-08-06 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86857 --- Comment #2 from joseph at codesourcery dot com --- A configure test can only test what sprintf does for the host, not for the target, so this would always need to be a target hook. Even with a hook, it would not surprise me if e.g. results

[Bug target/86808] tilegx port needs updating for CVE-2017-5753

2018-08-01 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86808 --- Comment #1 from joseph at codesourcery dot com --- Given that both tilegx and tilepro only support *-linux* targets and the Linux kernel has removed support for those architectures, we might consider obsoleting those ports (as previously

[Bug c/86690] [PATCH] Duplicate field in anonymous union causes infinite loop

2018-07-26 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86690 --- Comment #2 from joseph at codesourcery dot com --- Please send patches (which should add a testcase to the GCC testsuite, and be tested with the GCC testsuite with no regressions) to gcc-patches.

[Bug middle-end/86631] [9 Regression] missing -Walloc-size-larger-than on ILP32 hosts

2018-07-24 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86631 --- Comment #3 from joseph at codesourcery dot com --- The relevant point is after do_compile calls lang_dependent_init. Since PTRDIFF_TYPE is a string, it's a pain to do anything with it until after the front end has set up tree nodes

[Bug middle-end/86631] [9 Regression] missing -Walloc-size-larger-than on ILP32 hosts

2018-07-24 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86631 --- Comment #1 from joseph at codesourcery dot com --- On Sun, 22 Jul 2018, msebor at gcc dot gnu.org wrote: > In ILP32 it sets the limit for the warning to LLONG_MAX which is greater than > the value of PTRDIFF_MAX on the targer (the in

[Bug c++/86598] Incorrect lexing of pp-numbers in C++11 due to hexfloat extension

2018-07-24 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86598 --- Comment #3 from joseph at codesourcery dot com --- On Fri, 20 Jul 2018, zhonghao at pku dot org.cn wrote: > g++ rejects the above code: You don't say what options you are using, or what compiler version; please include that in future

[Bug tree-optimization/86396] fold calls to strtod() into constants where possible

2018-07-23 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86396 --- Comment #2 from joseph at codesourcery dot com --- You can't fold atof ("3.14") with -frounding-math because the result depends on the rounding mode, or with -ftrapping-math (which is the default) because it should rais

[Bug tree-optimization/86367] FRE1 tree pass deletes code in gcc.target/powerpc/nan128-1.c when long double is IEEE 128

2018-06-30 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86367 --- Comment #7 from joseph at codesourcery dot com --- If you use __builtin_nansf128 (which returns _Float128) but __float128 is long double, it's possible the implicit conversion from storing the result of __builtin_nansq in y.value results

[Bug tree-optimization/86259] [8/9 Regression] min(4, strlen(s)) optimized to strlen(s) with -flto

2018-06-22 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86259 --- Comment #13 from joseph at codesourcery dot com --- Well, C90 TC1 adds (to the informative Annex listing undefined behavior) the case of array subscripts being out of range even if they wouldn't be simply based on the top-level object

[Bug c/86221] _Generic not match function return that has _Atomic

2018-06-19 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86221 --- Comment #1 from joseph at codesourcery dot com --- The C17 specification for function return types says "function returning the unqualified version of T", not "function returning the unqualified, non-atomic version of

[Bug target/85961] scratch register rsi used after function call

2018-06-15 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85961 --- Comment #6 from joseph at codesourcery dot com --- On Fri, 15 Jun 2018, rguenth at gcc dot gnu.org wrote: > So - all process_options () option post-processing should go away and be moved > to finish_options ()? I think reducing the

[Bug c/86134] earlier diagnostic causes followup diagnostic about unknown -Wno-* options

2018-06-15 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86134 --- Comment #10 from joseph at codesourcery dot com --- On Fri, 15 Jun 2018, rguenth at gcc dot gnu.org wrote: > Joseph, do you agree that the following shouldn't fail the compilation? > > > echo 'int main(){}' | gcc -S -x c

[Bug c/86137] ubsan runtime error in c-format.c

2018-06-13 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86137 --- Comment #1 from joseph at codesourcery dot com --- Yes, this code needs to be fixed to avoid undefined overflow (if argnum > INT_MAX / 10 || (argnum == INT_MAX / 10 && *fcp - '0' > INT_MAX % 10), record that overflow has occu

[Bug c/85995] GCC defines __STDC__ and __STDC_VERSION__ even when used with options that break C conformance

2018-06-01 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85995 --- Comment #5 from joseph at codesourcery dot com --- On Fri, 1 Jun 2018, vincent-gcc at vinc17 dot net wrote: > Programmers normally use conditionals on '__STDC__' to ask whether > it is safe to use certain features of

[Bug c/85997] Bogus -Wvla warning from function array argument with size expression

2018-06-01 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85997 --- Comment #3 from joseph at codesourcery dot com --- The requirements on array declarators apply before parameter arrays decay to pointers; see DR#047 (which concerns the case of an incomplete element type - not itself a constraint violation

[Bug c/85997] Bogus -Wvla warning from function array argument with size expression

2018-06-01 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85997 --- Comment #1 from joseph at codesourcery dot com --- Well, that's a VLA before the decay to pointer type, and thus violates the C90 constraint referenced in the diagnostic. So a diagnostic is obviously required with -std=c90 -pedantic

[Bug c/85995] GCC defines __STDC__ and __STDC_VERSION__ even when used with options that break C conformance

2018-06-01 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85995 --- Comment #3 from joseph at codesourcery dot com --- See trouble.texi, "Non-bugs" / "Certain Changes We Don't Want to Make", "Undefining @code{__STDC__} when @option{-ansi} is not used." (and the description

[Bug c/85957] i686: Integers appear to be different, but compare as equal

2018-05-31 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85957 --- Comment #11 from joseph at codesourcery dot com --- On Mon, 28 May 2018, vincent-gcc at vinc17 dot net wrote: > floating-point expression: Once a floating-point number has been converted > into > an integer type, the value of thi

[Bug bootstrap/85921] /gcc/c-family/c-warn.c fails to build

2018-05-25 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85921 --- Comment #16 from joseph at codesourcery dot com --- On Fri, 25 May 2018, msebor at gcc dot gnu.org wrote: > Beyond that, #defining macros that match known attributes to something else > seems like asking for trouble. It even c

[Bug bootstrap/85921] /gcc/c-family/c-warn.c fails to build

2018-05-25 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85921 --- Comment #14 from joseph at codesourcery dot com --- On Fri, 25 May 2018, gcc at mailinator dot com wrote: > https://gcc.gnu.org/install/ doesn't say anything about make headers_install. That's because it's not part of installing GCC, i

[Bug web/85917] GCC 8 Changes page fails to mention change of default mode for C

2018-05-25 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85917 --- Comment #1 from joseph at codesourcery dot com --- The difference between -std=gnu11 and -std=gnu17 is not meant to be significant, since apart from the __STDC_VERSION__ change C17 is purely a bug-fix version and so there are no other

[Bug c/85810] gcc incorrectly handles declarations inside parameter lists of function declarators.

2018-05-16 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85810 --- Comment #3 from joseph at codesourcery dot com --- On Wed, 16 May 2018, cookevillain at yahoo dot com wrote: > The Standard is supposed to be a formal specification of the language, so if No, it isn't. It's for humans, who n

[Bug c/85810] gcc incorrectly handles declarations inside parameter lists of function declarators.

2018-05-16 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85810 --- Comment #1 from joseph at codesourcery dot com --- This is an obviously perverse interpretation of the standard that is inconsistent with the intent expressed explicitly if non-normatively in 6.7.6.3#18 ("The identifiers x

[Bug target/85733] ARM -mbe8 behaviour doesn't match documentation

2018-05-10 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85733 --- Comment #1 from joseph at codesourcery dot com --- Sounds like a regression if this is the case, since bpabi.h in GCC 7 does include march=armv8-a in BE8_LINK_SPEC.

[Bug target/85665] Multiple typos in diagnostics

2018-05-08 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85665 --- Comment #8 from joseph at codesourcery dot com --- On Sun, 6 May 2018, roland.illig at gmx dot de wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85665 > > --- Comment #3 from Roland Illig --- > (In reply to Jonathan

[Bug middle-end/38960] Wrong floating point reorder

2018-05-04 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38960 --- Comment #5 from joseph at codesourcery dot com --- Since any non-const function can examine floating-point state, I'd expect significant effects on code generation. (Whether this also applies to asms depends on the architecture; some

[Bug tree-optimization/85585] switch to select a string based on an enum can profitably optimize away the table of pointers/offsets into fixed-length char[] blocks. Or use byte offsets into a string

2018-05-01 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85585 --- Comment #2 from joseph at codesourcery dot com --- On Tue, 1 May 2018, peter at cordes dot ca wrote: > The current strings + pointer-table implementation doesn't merge string > literals where one string is a suffix of a

[Bug target/84829] -mieee-fp causes to link with -lieee but that is no longer available

2018-04-30 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84829 --- Comment #14 from joseph at codesourcery dot com --- As I said in comment#10, I think the solution is to remove the specs making -mieee-fp imply -lieee. (Principally the spec in gnu-user.h. I don't think this should depend on what libc

[Bug c++/85518] ICE mangling _FloatN types

2018-04-24 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85518 --- Comment #2 from joseph at codesourcery dot com --- You still need some of the built-in functions for use with __float128 in C++ when that has a different format from long double. It's the built-in functions for types with the same format

[Bug c/65892] gcc fails to implement N685 aliasing of union members

2018-04-23 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65892 --- Comment #39 from joseph at codesourcery dot com --- On Thu, 19 Apr 2018, jameskuyper at verizon dot net wrote: > Code which relies upon this feature to implement a C-style approximation to > inheritance has been fairly common,

[Bug c/85361] Variable length array allowed in c89/90

2018-04-20 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85361 --- Comment #3 from joseph at codesourcery dot com --- See the documentation of -std=, regarding base standards. # The compiler can accept several base standards, such as @samp{c90} or # @samp{c++98}, and GNU dialects of those standards

[Bug c/10360] __alignof__(double) answer 8

2018-04-19 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10360 --- Comment #12 from joseph at codesourcery dot com --- On Wed, 11 Apr 2018, jason at gcc dot gnu.org wrote: > The quoted passage in the documentation now reads > > --- > Some machines never actually require alignment; they all

[Bug c++/69560] x86_64: alignof(uint64_t) produces incorrect results with -m32

2018-04-19 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69560 --- Comment #20 from joseph at codesourcery dot com --- I consider it part of the ABI that long long __attribute__((__aligned__(__alignof__(long long, as in the definition of max_align_t (and similarly in gnulib's max_align_t definition

[Bug c/85182] _Static_assert is less than useful in a static inline

2018-04-03 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85182 --- Comment #1 from joseph at codesourcery dot com --- This is how static assertions are defined in C11, not a bug in GCC: it's a constraint violation if the constant expression compares equal to 0, regardless of the context in which

<    1   2   3   4   5   6   7   8   9   10   >