Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, The code test.c
#include
#include
void foo(int* a ) {
a[-1]=1;
}
int main (int argc, char* argv[]) {
int size= 10
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, this code test.c
#include
#include
#include
int main (int argc, char* argv[]) {
int size = 1000;
printf("%d \n", size);
int array[size];
memset(ar
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94055
--- Comment #3 from Haoxin Tu ---
I see. Thank you for your responding.
Have a good day!
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, I use clang with AddressSanitizer and detected memory leaks while building
GCC.
The SUMMARY are
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, the test.c (reduced by C-Reduce)
#include
int a = 0,b = 0;
int main(){
int c = (int)(long)(b * 0 >= a & b * 0 >= a);
return 0;
}
$gcc-6 test.c
then got the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91867
Haoxin Tu changed:
What|Removed |Added
CC||haoxintu at gmail dot com
--- Comment #4
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This case example.cpp
#include
volatile wchar_t g_volatile_wchar = 2082494266;
volatile unsigned short g_volatile_ushort = 31503U;
int main () {
unsigned long
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95326
Haoxin Tu changed:
What|Removed |Added
Version|11.0|10.0
--- Comment #1 from Haoxin Tu ---
I al
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95326
--- Comment #3 from Haoxin Tu ---
Would GCC shorten the multiple to be other types early as well? I also find
some cases in "short" type with the same symptom. I am still testing now and
don't know there are any cases in rest of types(such as cha
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code test1.cc
#include
#include
wchar_t g_wchar = 0;
int g_int = -1975564288;
int l_int = -1227761344;
int main () {
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95334
--- Comment #2 from Haoxin Tu ---
I also find these cases
test1.cc
#include
bool g_bool = 0;
long g_long = -4075183478711827874L;
const long l_long = 7122990940771016367L;
int main () {
g_bool = g_long * l_long;
std::cout << g_bool <<
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This case test.cc
#include
#include
void has_nonnull_argument(__attribute__((nonnull)) int *p) {
;
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95354
--- Comment #3 from Haoxin Tu ---
I see. Are there any cases that can trigger the UB of nonnull-attribute? I
doubt the usage of “-fsanitize=nonnull-attribute” in GCC...
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95354
--- Comment #5 from Haoxin Tu ---
(In reply to Jonathan Wakely from comment #4)
> (In reply to Haoxin Tu from comment #3)
> > I see. Are there any cases that can trigger the UB of nonnull-attribute? I
> > doubt the usage of “-fsanitize=nonnull-at
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code test1.cc
#include
int main () {
int a = 1;
for (int i = 0; i < 10; ++i) {
a /= i; // Error: division by zero on
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95385
--- Comment #3 from Haoxin Tu ---
(In reply to Richard Biener from comment #2)
> We likely eliminate the dead 0/0 and 0/b instructions but fail for the one in
> the loop at -O0. As soon as the actual instruction is carried out the
> program trap
y: P3
Component: sanitizer
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at
gcc dot gnu.org
Target Mile
++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This case test.cc
#include
int main () {
int a[10] = {0};
a[11] = 0;
std::cout << "ok" << std::endl;
return 0;
}
produce nothing in gcc-t
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95385
--- Comment #4 from Haoxin Tu ---
(In reply to Haoxin Tu from comment #3)
Hi, so sorry to bother you.
Is still there any problem here? Please take a look at test3.cc and test4.cc.
Thank you so much.
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
$cat null_ref.cc
int main(){
int &x1 = *(int *)nullptr; // null reference
return 0;
}
GCC can not catch any warning when I use -Wnull-dereference option
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
$cat test.cc
int main(){
int var = 2;
switch (var) {
case 1:
default
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95475
--- Comment #2 from Haoxin Tu ---
(In reply to Andrew Pinski from comment #1)
> The question is where should it be, at the open of the () or the start of
> the identifier __builtin_unreachable ? In C++, it is the open. In C, it is
> the start.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65969
Haoxin Tu changed:
What|Removed |Added
CC||haoxintu at gmail dot com
--- Comment #3
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This case test.cc
#include
int main() {
return {{}};
}
In the version of GCC 6.1 - 8.4, it's compiled ok.
But in GCC 6.
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code test.cc
int main(){
auto a = [ & ] (...) noexcept(1+1) {};
return 0;
}
$g++-trunk test.cc
test.cc:2:38: error: narrowing conversion of
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This case test.cc
typedef int T;
using typename ::T;
GCC fails to compile it.
$g++ -c test.cc
test.cc:2:18: error: expected n
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This case test.cc
class s;
class ::s { } ss;
$g++ -c test.cc
test.cc:2:11: error: global qualification of class name is inva
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95559
--- Comment #2 from Haoxin Tu ---
(In reply to Marek Polacek from comment #1)
> I can't find a version of GCC that compiled this.
Hi, so sorry I might use the wrong test case. Please try this case bug.cc
instead
#include
int main(){
int
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95559
--- Comment #3 from Haoxin Tu ---
(In reply to Haoxin Tu from comment #2)
> $g++-8 test.cc ; ./a.out
> 0
Here is
> $g++-8 bug.cc ; ./a.out
> 0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95559
--- Comment #5 from Haoxin Tu ---
(In reply to Marek Polacek from comment #4)
> That's the same case, initializing an int with {{}}. GCC 8 compiled the
> second testcase, but that was fixed in r269045.
Ok, got it. At least this was a bug, can y
++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code bug.cc
class A {};
class B : virtual class A{};
In gcc-trunk
$g++ -c bug.cc
bug.cc:2:19: error: expected class-name before ‘class’
2 | class B : virtual class
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code bug.cc
#include
int main(){
int a ();
std::cout << a << std::endl;
return 0;
}
In GCC-trunk without "-fsanitize=undefined"
mponent: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code bug.cc
decltype (auto) foo( decltype (auto) a ){ }
in GCC-trunk
$g++ -c -std=c++11 bug.cc
bug.cc:1:11: error: expected primary-expression before ‘a
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code bug.cc in GCC 8.1 - 9.3 gives the bogus duplicate error messages.
$cat bug.cc
decltype (auto) var = 0;
Take GCC-9, G
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
$cat bug.cc
int a;
long foo1 ( void = a, double param2 ,decltype (auto) param3 = a){ }
long foo2 ( void = a, doub
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
$cat bug.cc
struct g_class : decltype (auto) ... { } ;
$g++ bug.cc
bug.cc:1:35: internal compiler error: in cxx_incomplete_type_diagnostic, at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95672
--- Comment #1 from Haoxin Tu ---
Noted that from GCC 6.1 to the trunk versions have this ICE, too.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95672
--- Comment #3 from Haoxin Tu ---
(In reply to Martin Liška from comment #2)
> Is it an invalid code right?
Yes. I think it's not a valid code and other compilers do not accept it, too.
++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code test.cc, GCC might get confused in parsing.
$cat test.cc
template friend foo ( decltype (b=c
$g++-trunk -w test.cc
test.cc:1:12: error: ‘a’ has not been declared
1
rity: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code test.cc, GCC-trunk get a bogus error message and then get confused
with following code parsing.
$cat test.cc
template <(union : dec
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code test.cc, makes GCC get confused while parsing.
$cat test.cc
template ’ before ‘;’ token
test.cc:1:22: error: expected unqualified-id before ‘;’ token
$g++-10 -w
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95725
--- Comment #2 from Haoxin Tu ---
(In reply to Martin Liška from comment #1)
> For the next time, can you please add 'ice-on-invalid-code' keyword?
Ok, so sorry it's my fault. But this is a diagnostic issue I think? I will add
"diagnostic" keywo
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95724
--- Comment #2 from Haoxin Tu ---
(In reply to Martin Liška from comment #1)
> For the next time, can you please add 'ice-on-invalid-code' keyword?
I got it. So sorry for my mistake!
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95725
--- Comment #6 from Haoxin Tu ---
Hi, there.
I hold the view that the compiler should have good fault tolerance, which means
giving an input(even invalid), the compiler might emit appropriate error
message diagnostics so that we can fix them int
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95725
--- Comment #7 from Haoxin Tu ---
By the way, can you take a look at bug 95597 and bug 95659? I think GCC should
accept the first case and shouldn't miss the error message in the second code.
Those cases are different from this report.
diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
CC: redi at gcc dot gnu.org
Target Milestone: ---
This code test.cc, I think it's not a garbage input
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
CC: mpolacek at gcc dot gnu.org, redi at gcc dot gnu.org
Target Milestone: ---
The test.cc includes a very simple valid decltype specifier with
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
GCC accepts "void value not ignored as it ought to be" in a function tem
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95807
--- Comment #2 from Haoxin Tu ---
(In reply to Andrew Pinski from comment #1)
> I think it is rejected at instanition time.
Hi, Andrew. Shouldn't it be rejected at compiling time?
Please take a look at another case, test.cc
$cat test.cc
void f
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code, bug.cc, GCC fails to compile it, while clang, icc, or msvc accepts
it well.
$cat bug.cc
namespace g_namespace
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95807
--- Comment #4 from Haoxin Tu ---
(In reply to Jonathan Wakely from comment #3)
> The ill-formed template is not diagnosed unless you instantiate it.
> That is allowed by the standard.
Thank you Jonathan, thanks for your response.
As other maj
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95807
--- Comment #6 from Haoxin Tu ---
(In reply to Jonathan Wakely from comment #5)
> What practical impact does this have on any real world code?
> Why should we spend time on that, rather than the million other things we
> have to fix?
Hi, Jonath
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This case bug.cc, reduced by C-Reduce, makes GCC crashed.
$cat bug.cc
wchar_t a = [] (struct {
$g
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This case bug.cc, reduced by C-Reduce, crashed GCC.
$cat bug.cc
constexpr (*a)()->bool,
$g++ -w -fpermissive small.cc
bug.cc:1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95820
--- Comment #1 from Haoxin Tu ---
(In reply to Haoxin Tu from comment #0)
> $g++ -w -fpermissive small.cc
Here is a mistake, and it should be
$g++ -w -fpermissive bug.cc
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
CC: mpolacek at gcc dot gnu.org
Target Milestone: ---
This code, bug.cc, GCC might emit the wrong line number of the "-Wconversion&
Keywords: diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
CC: mpolacek at gcc dot gnu.org
Target Milestone: ---
This code, bug.cc, GCC emits two
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
CC: mpolacek at gcc dot gnu.org
Target Milestone: ---
This code, bug.cc, GCC emits two duplicated warning messages about it.
$cat bug.cc
Keywords: diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
CC: mpolacek at gcc dot gnu.org
Target Milestone: ---
This code, bug.cc, GC
diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
CC: mpolacek at gcc dot gnu.org
Target Milestone: ---
$cat bug.cc
class A:
public
A,
A,
A
{} g_class;
$g++
diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
CC: mpolacek at gcc dot gnu.org
Target Milestone: ---
This code, bug.cc, GCC might give the wrong line number
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95892
--- Comment #3 from Haoxin Tu ---
(In reply to Jonathan Wakely from comment #1)
> This is a well-known issue where diagnostics in function parameter-lists all
> have the location of the closing brace.
Thank you, Jonathan.
I guess bug 95831 has
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95809
--- Comment #3 from Haoxin Tu ---
(In reply to Nathan Sidwell from comment #2)
> yup, dr2061 made that ill-formed.
>
> p1701 (wg21.link/p1701) documents the behaviour and it appears EWG is
> exploring another avenue to resolve the underlying p
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95892
--- Comment #5 from Haoxin Tu ---
(In reply to Jonathan Wakely from comment #4)
> Yes, thanks, I've closed that one as a duplicate too.
Ok, you are so welcome.
By the way, could you please check other diagnostic issues (bug95871, bug95872,
bug9
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code, bug.cc, reduced by C-Reduce, makes GCC ICE.
$cat bug.cc
class a;
template https://gcc.gnu.org/bugs/> for instructions.
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code, bug.cc, reduced by C-Reduce, makes GCC ICE.
$cat bug.cc
class {
struct a < struct { b ( {
$g++ bug.cc
bug.cc:2:8: er
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code, bug.cc, reduced by C-Reduce, makes GCC-trunk ICE with Segmentation
fault signal terminated
++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code, bug.cc, reduced by C-Reduce, makes GCC-trunk ICE.
$cat bug.cc
void a { [] (auto, volatile b
$g++ bug.cc
bug.cc:1:6: error: variable or field ‘a’ declared void
1
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code, bug.cc, reduced by C-Reduce, makes GCC-trunk ICE.
$cat bug.cc
template > struct a < class b{}, struct b {
$g++
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code, bug.cc, reduced by C-Reduce, makes GCC-trunk ICE with Segmentation
fault.
$cat bug.cc
enum struct a;
template enum struct a {
$g++ bug.cc
bug.cc
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code, bug.cc. reduced by C-Reduce, makes GCC-trunk ICE.
$cat bug.cc
typedef (*a)()->const =
$g++ -fpermissive -w bug.cc
bug
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code, bug.cc, reduced by C-Reduce, makes GCC-trunk ICE.
$cat bug.cc
void a { [].decltype(auto)::b
-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code, bug.cc, reduced by C-Reduce, makes GCC-trunk ICE.
$cat bug.cc
a ( union { auto
$g
: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code, bug.cc, reduce by C-Reduce, makes GCC-trunk ICE.
$cat bug.cc
a ( auto struct { b (
$g++ -w bug.cc
bug.cc:1:17: error: types may not be
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code, bug.cc, reduced by C-Reduce, makes GCC-trunk ICE.
$cat bug.cc
short a;
thread_local b ( auto , = ( a
: haoxintu at gmail dot com
Target Milestone: ---
This code, bug.cc, reduced by C-Reduce, makes GCC-trunk ICE.
$cat bug.cc
enum class a : struct {}
template < < > > enum class a : union b {}
enum class a { c
$g++ bug.cc
bug.cc:1:25: error: expected ‘;’ after struct definition
1 |
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code, bug.cc, reduced by C-Reduce, makes GCC-trunk ICE.
$cat bug.cc
a ( auto struct : decltype ( auto ) { {
$g++ bug.cc
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code, bug.cc, reduced by C-Reduce, makes GCC-trunk ICE.
$cat bug.cc
a() { [] ( struct { b ( auto
$g++ -w bug.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95972
--- Comment #1 from Haoxin Tu ---
Hi, there.
I guess I shouldn't use C-Reduce to reduce my ICE on invalid code cases. After
using C-Reduce, the cases are more like a "garbage" code.
Here is a more readable code to reproduce the ICE.
$cat p.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95945
--- Comment #1 from Haoxin Tu ---
Add a more meaningful case
$cat p.cc
int a ( auto struct x { int b ();}) {}
$g++ -w p.cc
p.cc:1:23: error: types may not be defined in parameter types
1 | int a ( auto struct x { int b ();}) {}
|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95956
W E Brown changed:
What|Removed |Added
CC||webrown.cpp at gmail dot com
--- Comment #1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95955
W E Brown changed:
What|Removed |Added
CC||webrown.cpp at gmail dot com
--- Comment #1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95931
--- Comment #1 from Haoxin Tu ---
Add a more meaningful case.
$cat p.cc
void a() {
auto var = [] (auto, volatile b) {};
}
$g++ p.cc
p.cc: In function ‘void a()’:
p.cc:2:35: error: ‘b’ does not name a type
2 | auto var = [] (auto, v
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95927
--- Comment #1 from Haoxin Tu ---
Add a more meaningful case.
$cat p.cc
template struct a {};
class A {
struct a < struct x { void b ( ){}} >;
};
$g++ p.cc
p.cc:3:25: error: types may not be defined in template arguments
3 | struc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95932
--- Comment #1 from Haoxin Tu ---
Add a more meaningful case.
$cat p.cc
template class a {};
template >
struct a < class b{}, struct b {}>;
$g++ p.cc
p.cc:2:28: error: expected ‘class’ or ‘typename’ before ‘>’ token
2 | template >
: diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This simple code, bug.cc, GCC-trunk can not emit the right diagnostic
information.
$cat bug.cc
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This invalid code, bug.cc, makes GCC-trunk ICE.
$cat bug.cc
struct a {template class A;};
a : b ( auto ) ( class { });
$g++ -c -w
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This small code, bug.cc, the -Wreturn-type warning disappears when add -O1 or
higher optimization option
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
As the summary, extra ";" should be allowed in GCC after -std=c++11 and
should
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, test.cc, has a grammar issue in "missing ')'", but GCC accepts it
well.
$cat test.cc
enum { a = ( 1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96077
--- Comment #2 from Haoxin Tu ---
(In reply to Jonathan Wakely from comment #1)
> It's not ideal to provide a testcase that doesn't compile for an
> accepts-invalid bug. A testcase that actually compiles is a better
> demonstration that the inval
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, test.cc, GCC rejects it in versions from 9.1 to trunk, but accepts
it from 8.3 to 4.8 versions.
$c
diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, "decltype(auto)" in return type is a c++14 extension and I guess GCC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96097
Haoxin Tu changed:
What|Removed |Added
CC||haoxintu at gmail dot com
--- Comment #3
NCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
The code test.cc
int main(){
try {}
catch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95972
--- Comment #2 from Haoxin Tu ---
Update a new case.
Input:
int a() { [] ( auto class {int b()}}
Output:
: In function 'int a()':
:1:27: error: types may not be defined in parameter types
1 | int a() { [] ( auto class {int b()}}
|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96110
--- Comment #5 from Haoxin Tu ---
(In reply to Jonathan Wakely from comment #2)
> This isn't specific to catch handlers, other compilers accept that nonsense
> function declaration in various contexts, and GCC rejects them all:
Thanks for your c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95972
--- Comment #4 from Haoxin Tu ---
(In reply to Marek Polacek from comment #3)
> You can still use creduce (I do), but it's good to try adding missing
> parens/braces and similar to make the code more sensible.
Yes, you are right. Thanks for you
ts-invalid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi,all.
This code, might be an invalid code, but GCC accepts it.
$cat test.cc
using alias1 = e
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, combines a typedef specifier and a normal type specifier, might be
an invalid code.
$cat test.cc
typedef long
1 - 100 of 184 matches
Mail list logo