https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115582
--- Comment #4 from tangyixuan ---
Thanks for your concerns. The type of "a.x" is converted to char in "(char *)a
+ 1", and it may be confused in clang under -O0 vs -O{2,3}. gcc-15 outputs the
"int" value, but the previous versions like gcc-5.3
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, I find GCC produces wrong code under optimizations when pointers point to
incompatible type
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, I find that GCC-15 produces the possible wrong code when compiling the
following code with "-O3 -fPIC"
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, GCC outputs different results with -O1/O3 during the compilation of the
following test case. Since Union allows different data
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, the following code is invalid due to the missing of ')' after '*' in Line
4. GCC reports an error which is dif
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98031
--- Comment #2 from tangyixuan ---
(In reply to Jakub Jelinek from comment #1)
> This is again diagnostics on uninstantiated template, invalid, no
> diagnostics required.
> Instantiate the template and it will be diagnosed.
Yeah, I agree with yo
++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, the following code has two errors. However, gcc only reports the second
error while ignoring the first one.
$ cat s.cpp
template
int fun(T i)
{
static void* labs
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, the following code misses a ';' at the end of the enum definition. GCC
reports an error with 'new
++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, the following code uses '__attribute__ ((__may_alias__))' to alias a struct
'S' to 'a'. However, gcc crashes at compilation time whi
++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, the following code has an error in 'S3' (maybe should be 'S2'). gcc accepts
it without error diagnostics.
$ cat s.cpp
template < class T > str
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, the abstract class could be used as a function return type, as well as the
parameter type and
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, when instantiating a function with a list of integer type, gcc rejects it
and reports two duplicate error messa
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, the following code maybe valid, since 'std::find_if' is allowed since
c++17.
https://en.cppreference.com/w/cpp/algorithm/find
$ cat s.cpp
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, the following code is ill-formed. GCC may not point out the error in code
(use of undeclared identifier 'A' and
++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, the following code declares a static Integer without specific value.
Usually, it will has a default value '0', and thus 'b[a]' could be declared as
b[0] p
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, gcc selects the overloaded definition operation+() although it is not
declared before.
$ cat s.cpp
#include
struct S {
template
void operator+(T
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, the parameters of 'func' are based on the values of 'i'. if 'a' is 4, does
it mean that 'i' is increased after '
++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, when executing the following code, GCC reports 32765 while clang reports 1.
Maybe there is something wrong?
$ cat s.cpp
#include
auto func(const int a) {
const int b
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, GCC 11 rejects the following code when the class 'A' is instantiated. When
I fed it into GCC 1O, it is accepted. A
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, the following code seems valid. The structure 'S' contains a template
function 'func1'
++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, the following code crashes GCC.
$ cat s.cpp
struct A {
A ();
A ( const A &);
A ( int );
};
A :: A (){
int a =0;
A b [a][0];
}
$ g++ -c s.cpp
du
: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, g++ hangs when executing the following code with -Os, while clang++ is ok.
$ cat s.cpp
namespace A {
inline int F1 (){}
}
int F2 ( int (* p )()){
return p ();
}
int main
++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, the following code is compiled with optimizations (-O1/O2/O3), but is not
compiled with -O0.
$ cat s.cpp
class C1 {
static void f1 ();
};
class C2
++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, g++ cannot compile the following code while clang success.
$ cat s.cpp
extern char a;
char a __attribute__ (( __section__ ("")));
$ clang++ -c s.cpp
success.
++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, the following code is not compiled by g++ but is compiled by clang.
$ cat s.cpp
int main (){
int a=2, b=3;
int A[a][b];
auto B
++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, GCC can not compile the following code, while Clang can. When I try to
replaces "typeof" with "decltype", other errors happens.
$ cat s.cpp
int F (
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, the following code is not compiled with -O0, but is compiled with
-O1/O2/O3.
$ cat s.cpp
typedef void (* A )();
template < A T > struct S { S (){}};
++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, gcc times out during execution of ./a.out with -O2/-O3/-Os:
$ cat s.cpp
template < class A > int B ( const A &){
int a = B ( a );
return a ;
}
int main
++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
The following code is rejected by g++. clang++ compiles it successfully.
$ cat s.cpp
template < int I > int F( char [I]);
template < int I > int F( char a = I );
in
++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
The following code (maybe valid) is rejected by g++, while is accepted by
clang.
$ cat s.cpp
template < int I > struct CA1{
enum { EA = 0};
};
template &
++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Please consider the following code. Clang++ compiles it successfully, while g++
fails:
$: cat s.cpp
struct a{};
template struct b {
using c=a;
};
class B
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
g++ crashes on the following code, while clang++ compiles successfully:
$: cat s.cpp
struct A {};
template
struct B
{
A a;
friend decltype(a);
};
int
++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, gcc crashes given the following example, while clang compiles normally.
$ cat 1.cpp
template struct X {};
namespace Nested {
template int f1(X... a);
int a1 = f1(X(), X
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91839
--- Comment #3 from tangyixuan ---
(In reply to Jonathan Wakely from comment #2)
> I can confirm GCC doesn't suggest l_24, but I'm not sure it's reasonable to
> expect it to do so after so many parse errors.
>
> If you fix the first two errors t
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92392
--- Comment #1 from tangyixuan ---
Hi, I replace the ‘int32_t’ with other identifier(here I replaced that with
abc):
1st case:
cat s.c
typedef int abc;
static abc * const f1(void);
gcc-trunk -c -Wignored-qualifiers s.c
s.c:2:8: warning: type qu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91839
--- Comment #1 from tangyixuan ---
Hi, there still exists the above error defect in recent GCC: no error
suggestions about ‘l_2’. The reduced code is as follow:
static long a //error
static int f1(void; //error
static int f1(void)
{
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90632
--- Comment #1 from tangyixuan ---
Hi:
I think the superfluous error information of ‘a’ in the above code is fixed in
gcc-trunk.
$ gcc-trunk -c s.c
s.c:1:13: error: expected ‘;’ before ‘static’
1 | static int c
| ^
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92479
--- Comment #4 from tangyixuan ---
(In reply to Eric Gallager from comment #2)
> (In reply to Andrew Pinski from comment #1)
> > The code for Wunreachable-code was removed a long time ago (around 5-10
> > years ago).
>
> There are some other bug
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92479
--- Comment #3 from tangyixuan ---
(In reply to Andrew Pinski from comment #1)
> The code for Wunreachable-code was removed a long time ago (around 5-10
> years ago).
Thanks for your time, Andrew.
I didn't notice that the -Wunreachable-code is i
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, there is no warning for the unreachable code with [-Wunreachable-code] as
follow. Would it be better to warn developers if the
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
The column of -Wignored-qualifiers warnings are different and not precise for
the two similar codes:
$: cat s.c
typedef int int32_t;
static int32_t * const f1(void
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, I have two questions for the following:
1. Array a[3] is out of bound, there is no warnings compiled with -ftree-vrp
-Warray-bounds=1. When compiled with -Wall with O1/O2/O3, there
: c
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
There is no warning for an invariable used in loop condition:
$: cat s.c
int main(){
for(int i = 0; i <2;){
}
}
$: gcc-trunk -Wall -Wextra -pedantic -c s.c
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
GCC outputs a wrong column number of a declared function warning:
$ gcc-trunk -Wstrict-prototypes -c s.c
s.c:1:1: warning: function declaration isn’t a prototype
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
[-Wmaybe-uninitialized] should be independent of optimization levels
(-O0/O1/../O3) or may be a spurious Warnings on -O1:
$ cat s.c
int main()
{
int i;
for(;i&l
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
gcc-7.4 falls to emit the warning for the following:
$ cat s.c
int main(){
unsigned long a = 8UL;
if(~a || a){
}
return 0;
}
$ gcc-7.4 -Wlogical-op s.c
Target
: c
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
GCC-trunk omits the error dignosis about "l_2" in the following error code:
$ cat s.c
static long a//error
static int f
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91820
--- Comment #3 from tangyixuan ---
(In reply to Andrew Pinski from comment #1)
> does adding -pedantic help?
Thanks for your reply.
When I add -padantic, gcc-trunk reports warning :
2:45: warning:initialization of ‘volatile int * volatile* const
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
GCC-trunk do not report the error diagnosis when there misses '&' in the
initialization. For example:
$: cat s.c
static volatile int * v
: c
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
GCC reports incorrect error diagnosis for error recovery.
For the following example, GCC should not report the undeclared variable after
error recovery when
: c
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
GCC 4.3.0, 4.4.3, 6.1.0, and 7.1.0 do not report the error diagnosis when there
is a redundant parenthesis token in the following scenario, as well as several
other
51 matches
Mail list logo