[Bug tree-optimization/31261] Missed tree optimizations: (8 - (x & 7)) & 7

2007-03-21 Thread trt at acm dot org
--- Comment #4 from trt at acm dot org 2007-03-21 18:28 --- I think this could be generalized to more operators, e.g. (y | (x & 7)) & 7 ^ (bitwise or, xor, multiply, ...) This optimization could be for "e & M" where e contains a subexpression of

[Bug c/16202] The -Wsequence-point warning misses many important instances

2007-01-17 Thread trt at acm dot org
--- Comment #9 from trt at acm dot org 2007-01-17 18:15 --- I made lvalue_p a global function in my personal gcc. I've proposed a dozen different warnings-related things for gcc, and never made headway on any of them. I'm just a random user and don't know the secret

[Bug libmudflap/27526] New: mudflap mishandles mmap when compiled -D_FILE_OFFSET_BITS=64

2006-05-09 Thread trt at acm dot org
everity: normal Priority: P3 Component: libmudflap AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: trt at acm dot org GCC build triplet: i686-pc-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27526

[Bug c/27007] Missed optimization of comparison with 'limited range'

2006-05-04 Thread trt at acm dot org
--- Comment #7 from trt at acm dot org 2006-05-04 17:21 --- For the tree-vrp.c part of this, perhaps VR_VARYING should be deprecated? I notice there is a single place (set_value_range_to_varying) which assigns VR_VARYING but a couple dozen places that check it. If instead a type-based

[Bug preprocessor/27137] Without -I- gcc needs another way to defer source dir. search

2006-04-13 Thread trt at acm dot org
--- Comment #3 from trt at acm dot org 2006-04-13 14:05 --- The patch for bug 19541 should resolve this, thanks! -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27137

[Bug preprocessor/27137] New: Without -I- gcc needs another way to defer source dir. search

2006-04-12 Thread trt at acm dot org
Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: trt at acm dot org GCC host triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27137

[Bug c/27136] New: Compile failure with -O -ffast-math

2006-04-12 Thread trt at acm dot org
ion: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: trt at acm dot org GCC host triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27136

[Bug c/27007] Missed optimization of comparison with 'limited range'

2006-04-03 Thread trt at acm dot org
--- Comment #3 from trt at acm dot org 2006-04-03 19:22 --- Since x is unsigned char, default promotions apply and x+1 will be a signed integer in the range 1..256 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27007

[Bug c/27007] New: Missed optimization of comparison with 'limited range'

2006-04-03 Thread trt at acm dot org
dot gnu dot org ReportedBy: trt at acm dot org GCC host triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27007

[Bug c/17946] wanted: warning for "a && MASK" when "a & MASK" was probably intended

2006-01-24 Thread trt at acm dot org
--- Comment #11 from trt at acm dot org 2006-01-24 20:33 --- HP liked this warning suggestion. It will be in their next compiler release. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17946

[Bug c/17534] gcc fails to diagnose suspect expressions that have incompatible bit masks

2005-11-15 Thread trt at acm dot org
--- Comment #5 from trt at acm dot org 2005-11-15 15:43 --- Since fold() is increasingly used for internal speculative computations, I think it should avoid issuing warnings as false positives are too likely. So perhaps this warning belongs in parser_build_binary_op() in c-typeck.c

[Bug c++/23447] False trigraph warning about literal string.

2005-08-17 Thread trt at acm dot org
--- Additional Comments From trt at acm dot org 2005-08-17 20:25 --- Perhaps the message could be clearer or less ominous, e.g. c.cc:4:15: warning: "??(" not changed, use -trigraphs to change it to "[" -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23447

[Bug tree-optimization/15353] [tree-ssa] Merge two "if"s if one subsumes the other.

2005-08-11 Thread trt at acm dot org
--- Additional Comments From trt at acm dot org 2005-08-11 15:52 --- I think http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21643 is closely related. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15353

[Bug c/23113] [3.4/4.0/4.1 regression] The -Wunused (value computed is not used) option missed an important case

2005-08-01 Thread trt at acm dot org
--- Additional Comments From trt at acm dot org 2005-08-01 16:48 --- Thanks! I did a grep of the gcc sources: find . -name '*.c' -print | xargs grep '^[ ]*\*[a-zA-Z_]*++;' and found 3 harmless cases of *p++ (* superfluous, sizeof(*p)==1), but also

[Bug c/23113] The -Wunused (value computed is not used) option missed an important case

2005-07-28 Thread trt at acm dot org
--- Additional Comments From trt at acm dot org 2005-07-28 19:27 --- In what sense is this bug "invalid"? The comment I noted in c-typeck.c does not match the current implementation, so one or both of those must be incorrect. Older versions of gcc issued a warning for &quo

[Bug c/23113] New: The -Wunused (value computed is not used) option missed an important case

2005-07-28 Thread trt at acm dot org
e Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: trt at acm dot org CC: gcc-bugs at gcc dot gnu dot org ht

[Bug c/8268] no compile time array index checking

2005-06-21 Thread trt at acm dot org
--- Additional Comments From trt at acm dot org 2005-06-21 15:55 --- Since there is mudflap, it is especially important to avoid false positives. One type occurs in code that never actually executes, e.g. conditional lookup: #define LOOKUP(i) (i < XSIZE ? x[i]: 0) To defend agai

[Bug middle-end/7776] const char* p = "foo"; if (p == "foo") ... is compiled without warning!

2005-06-06 Thread trt at acm dot org
--- Additional Comments From trt at acm dot org 2005-06-06 15:48 --- I recommend a version with fewer false positives. I've been using a warning like this for years, with zero false positives. The current gcc-4-ified version is: - /* check for comparing string constant with any

[Bug middle-end/21059] Bogus warning about clobbered variable

2005-06-02 Thread trt at acm dot org
--- Additional Comments From trt at acm dot org 2005-06-02 18:40 --- The current warning algorithm is too simple. This would be better: For each function that contains call(s) to setjmp(), compute: ref_nz The set of variables that might possibly be live

[Bug tree-optimization/21643] GCC fails to merge ranges in comparison.

2005-05-18 Thread trt at acm dot org
--- Additional Comments From trt at acm dot org 2005-05-18 17:28 --- Here is a equivalent case that gcc also misses (but beyond scope of fold-const.c). By the way, since there is a missing final return, can't gcc just simplify all three functions into "return 1;" :-) int

[Bug tree-optimization/21643] GCC fails to merge ranges in comparison.

2005-05-18 Thread trt at acm dot org
--- Additional Comments From trt at acm dot org 2005-05-18 17:21 --- This is because fold-const.c only does ad-hoc re-association. Here is an example for fold_truthop (approx line 8805) /* Check for the possibility of merging component references. If our lhs is another

[Bug c/21550] New: i686 floating point performance 33% slower than gcc 3.4.3

2005-05-13 Thread trt at acm dot org
Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: trt at acm dot org CC: gcc-bugs at gcc dot gnu dot org GCC target triplet: i6

[Bug middle-end/21474] missed optimizations when comparing address to NULL

2005-05-12 Thread trt at acm dot org
--- Additional Comments From trt at acm dot org 2005-05-12 15:08 --- I think it is reasonable to assume the address of an auto variable is non-NULL, and so the address of anything in the local "int x[10];" is non-NULL. So gcc can (and does) fold "if (x) ..." and &

[Bug c/21474] New: missed optimizations when comparing address to NULL

2005-05-09 Thread trt at acm dot org
Summary: missed optimizations when comparing address to NULL Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: trt at

[Bug c/21380] New: ICE compiling with -O

2005-05-04 Thread trt at acm dot org
o: unassigned at gcc dot gnu dot org ReportedBy: trt at acm dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21380

[Bug middle-end/16302] gcc fails to warn about some common logic errors

2005-04-29 Thread trt at acm dot org
--- Additional Comments From trt at acm dot org 2005-04-29 20:20 --- The patch given in comment #4 no successfully applies because the warning() function has new initial parameter. Also the fold_buildN() cleanup invalidated (and fixed) the "REAL_CST" part of the patch. Some &q

[Bug c/17946] wanted: warning for "a && MASK" when "a & MASK" was probably intended

2004-12-08 Thread trt at acm dot org
--- Additional Comments From trt at acm dot org 2004-12-08 18:48 --- I should mention there is a hack for the problem noted in comment #5: do the temporary truthvalue conversions with warnings suppressed. That is, change the two instances of tree t = lang_hooks.truthvalue_conversion

[Bug c/17946] wanted: warning for "a && MASK" when "a & MASK" was probably intended

2004-10-14 Thread trt at acm dot org
--- Additional Comments From trt at acm dot org 2004-10-14 15:54 --- > a && 4 in their code meaning a != 0 && 4 !=0 That happens, but when it does `a' is not integer type. I use a gcc with this warning on a 35Mloc code base. There are currently 4 warnings, a

[Bug c/17946] wanted: warning for "a && MASK" when "a & MASK" was probably intended

2004-10-12 Thread trt at acm dot org
--- Additional Comments From trt at acm dot org 2004-10-12 18:52 --- Given the problem pointed out in http://gcc.gnu.org/ml/gcc-patches/2004-10/msg01013.html I do not see how this patch can be readily made to work. To avoid redundant truthvalue conversion it might be necessary e.g. to

[Bug c/17946] wanted: warning for "a && MASK" when "a & MASK" was probably intended

2004-10-12 Thread trt at acm dot org
--- Additional Comments From trt at acm dot org 2004-10-12 14:45 --- Patch here: http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00990.html This patch does not warn about "a && 1" for the reason noted in comment #1. Some mistakes will go unwarned, but it still catches

[Bug c/17946] New: wanted: warning for "a && MASK" when "a & MASK" was probably intended

2004-10-12 Thread trt at acm dot org
bably intended Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: trt at acm dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17946