[Bug ada/116644] Warnings in generic code don't report column number

2024-09-09 Thread mytbk920423 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116644 --- Comment #2 from Iru Cai --- (In reply to Eric Botcazou from comment #1) > Why is that insufficient exactly? 256 is clearly not in range of My_Byte. I mean the warning messages don't have the information pointing out which code in this line

[Bug ada/116644] New: Warnings in generic code don't report column number

2024-09-07 Thread mytbk920423 at gmail dot com via Gcc-bugs
y: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: mytbk920423 at gmail dot com CC: dkm at gcc dot gnu.org Target Milestone: --- When compiling the following Ada code, GCC gives a warning with the correct line number, but doesn't have

[Bug tree-optimization/115824] [12 Regression] Strange -Warray-bounds warning when assigning an initializer list to a vector of pointers

2024-07-30 Thread mytbk920423 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115824 --- Comment #11 from Iru Cai --- (In reply to Sam James from comment #7) > (In reply to Randy MacLeod from comment #5) > > As far as I know, the commit itself is fine, and it's the pesky middle-end > warnings again getting confused. > > Jonath

[Bug tree-optimization/115824] [12 Regression] Strange -Warray-bounds warning when assigning an initializer list to a vector of pointers

2024-07-30 Thread mytbk920423 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115824 --- Comment #6 from Iru Cai --- I build a GCC with 12.3.0 source, and replace the libstdc++ with the 12.4.0 one, and reproduce this problem.

[Bug libstdc++/115824] New: Strange -Warray-bounds warning when assigning an initializer list to a vector of pointers

2024-07-08 Thread mytbk920423 at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: mytbk920423 at gmail dot com Target Milestone: --- The following code has a strange warning on GCC 12.4.0 when compiled with -O2 -Warray-bounds

[Bug c++/109260] New: -fdump-ada-spec does not support C++ namespaces

2023-03-23 Thread mytbk920423 at gmail dot com via Gcc-bugs
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mytbk920423 at gmail dot com Target Milestone: --- For example, the following C++ code has three namespaces: namespace test_ns { namespace test_ns_1 { struct A_Record { int x, y; }; } namespace test_ns_2

[Bug c/102909] Missing -Wunused-but-set-variable warning

2021-10-23 Thread mytbk920423 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102909 --- Comment #3 from Iru Cai --- Looks like this kind of things are detected in the front-end. The GNAT front-end can warn on the similar things: procedure Main is A : Integer; B : constant Integer := 1; begin A := 0;

[Bug c/102909] Missing -Wunused-but-set-variable warning

2021-10-23 Thread mytbk920423 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102909 --- Comment #2 from Iru Cai --- So it looks something like https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 GCC thinks ``a`` is set but not used in ``a = 1 + b;``, but is used in ``a = 1; a += b;``.

[Bug c/102909] New: Missing -Wunused-but-set-variable warning

2021-10-23 Thread mytbk920423 at gmail dot com via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: mytbk920423 at gmail dot com Target Milestone: --- GCC misses the -Wunused-but-set-variable in the some code (GCC and Clang output can be seen in https://godbolt.org/z/7658M4qra). I first found a bug caused by the following

[Bug other/102495] New: optimize some consecutive byte load pattern to word load

2021-09-26 Thread mytbk920423 at gmail dot com via Gcc-bugs
Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: mytbk920423 at gmail dot com Target Milestone: --- I use the following code get a 32-bit word from a byte array by loading each byte and shifting them, but GCC doesn't optimize the co

[Bug c++/101775] New: G++ drops namespace prefix of argument in the referenced function symbol

2021-08-04 Thread mytbk920423 at gmail dot com via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mytbk920423 at gmail dot com Target Milestone: --- When g++ builds following code, the function foo() referenced by this program is compiled to symbol ``foo(VecReg&)``, w

[Bug ada/101385] -Werror doesn't have effect on Ada frontend

2021-07-09 Thread mytbk920423 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101385 --- Comment #2 from Iru Cai --- Thanks, -gnatwe works for both gcc and gnatmake. I see in the gnat_ugn manual that there is still the -Werror option that causes GCC back end to treat warnings as errors. Is that means -gnatwe is for front end, an

[Bug ada/101385] New: -Werror doesn't have effect on Ada frontend

2021-07-09 Thread mytbk920423 at gmail dot com via Gcc-bugs
onent: ada Assignee: unassigned at gcc dot gnu.org Reporter: mytbk920423 at gmail dot com Target Milestone: --- I try to make the GCC Ada compiler error when there're warnings, but -Werror doesn't work. $ gcc -c -O2 -Werror test.adb && echo "Command return

[Bug target/101175] New: builtin_clz generates wrong bsr instruction

2021-06-22 Thread mytbk920423 at gmail dot com via Gcc-bugs
: target Assignee: unassigned at gcc dot gnu.org Reporter: mytbk920423 at gmail dot com Target Milestone: --- Built with '-march=x86-64-v3 -O1', the following code generates a bsr instruction, which has undefined behavior when the source operand is zero, thus gives wr

[Bug c++/100699] New: g++ doesn't warn uninitialized field when the class is derived from another class

2021-05-20 Thread mytbk920423 at gmail dot com via Gcc-bugs
IRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mytbk920423 at gmail dot com Target Milestone: --- GCC doesn't warn on the following code when class B is a derived class. -

[Bug target/100347] [11/12 Regression] GCC 11 does not recognize skylake; translates "march=native" to "x86_64"

2021-05-06 Thread mytbk920423 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100347 Iru Cai changed: What|Removed |Added CC||mytbk920423 at gmail dot com --- Comment #6

[Bug c/97982] integer casting after abs() causes undefined behavior

2020-11-25 Thread mytbk920423 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97982 --- Comment #1 from Iru Cai --- Hmm, I saw in the abs(3) that "Trying to take the absolute value of the most negative integer is not defined." But it's still strange to see a uint32->uint64_t cast results in a negative value.

[Bug c/97982] New: integer casting after abs() causes undefined behavior

2020-11-25 Thread mytbk920423 at gmail dot com via Gcc-bugs
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: mytbk920423 at gmail dot com Target Milestone: --- The following code has different result when compiling with -O0/-O1 and -O2. Also, ubsan will report an error. But I don't know why the signed(INT_MIN)->unsig

[Bug c++/92968] New: C style struct initialization fail to compile in g++ when initializing array fields

2019-12-16 Thread mytbk920423 at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mytbk920423 at gmail dot com Target Milestone: --- The following program cannot be compiled with g++ but can be compiled with clang++ or any C compiler including gcc

[Bug c/87367] GCC gives false warning on -Wnull-dereference when using -O2

2018-09-20 Thread mytbk920423 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87367 Iru Cai changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c/87367] New: GCC gives false warning on -Wnull-dereference when using -O2

2018-09-20 Thread mytbk920423 at gmail dot com
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: mytbk920423 at gmail dot com Target Milestone: --- When compiling the following program with -Wnull-dereference, GCC doesn't warn when using -O1, but warns when using -O2. #include ty