: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
Minimal testcase:
// compile with: gcc -O2 -Wall bug.cpp
static int * foo()
{
int a = 42;
int * b = &a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96988
--- Comment #2 from Alfred Agrell ---
Poked this thing a bit more, and discovered that there's no need for inlining,
you can reproduce it just as well with an extra {}.
And if you copy the function a few times, the warnings start pointing to wro
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80521
Alfred Agrell changed:
What|Removed |Added
CC||blubban at gmail dot com
--- Comment #1
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
Created attachment 41092
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41092&action=edit
Testcase
Input (also attached):
template
void foo1()
{
regis
IRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
struct string {
const char * m;
template string(const char (&str)[N]) { m = "CONST"; }
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91212
Alfred Agrell changed:
What|Removed |Added
CC||blubban at gmail dot com
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97221
Alfred Agrell changed:
What|Removed |Added
Resolution|--- |DUPLICATE
Status|UNCONFIRMED
ent: other
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
"Outside strict ISO C mode [...], the functions [...] roundeven, roundevenf,
roudnevenl, scalbf [...]"
Should
: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
struct my_class {
int data[4];
};
void fn1();
void fn2()
{
my_class local = local
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
#include
#include
template
void fun(T);
template <>
void fun(char c)
{
std::puts("foo()");
}
template
void fun(I i)
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
enum class Type { Pawn };
struct Piece {
Type type : 4;
};
void foo() {
switch (Piece().type)
case Type::Pawn:;
}
The above causes an ICE
Priority: P3
Component: web
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
https://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.predefined
> You can also run g++ -E -dM - < /dev/null" to display
onent: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
In header , function __from_chars_alnum calls std::isdigit().
In addition to looking weird ("everyone" knows ctype is locale dependent and
charconv is not),
c
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
Input:
union U {
int value;
: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
Input:
template
int* a() { return x; }
template
auto b() { return a; }
template
auto c() ->
: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
template
int b()
{
constexpr int c = 123;
constexpr int d = 456;
return [&](){
++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
To reproduce:
- Create a minimal coroutine promise
- Create a coroutine where any local's type has no linkage (for example a
lambda)
- #include the above from an
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103871
Alfred Agrell changed:
What|Removed |Added
CC||blubban at gmail dot com
--- Comment
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
#include
#include
struct my_params {
std::unique_ptr ptr; // or any other object with nontrivial dtor
};
static std
: sanitizer
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban 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 Milestone: ---
Input
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
void a(int, int) {}
template
void b()
{
[](auto... ch){
[ch...](Ts... newvals) {
(a(ch, newvals
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107337
Alfred Agrell changed:
What|Removed |Added
CC||blubban at gmail dot com
--- Comment
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
template struct foo;
void* bar()
{
return (decltype(foo<5>)*)5;
}
No flags needed.
Result:
: In function 'void* bar()':
:5:31: error: type/v
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105804
Alfred Agrell changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
template struct S {};
template
void foo()
{
using foo_t = decltype([](){});
[]() { S{}; }();
}
void bar() { foo(); }
-std=c++20
: In instantiation of
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
struct S
{
S() {}
S(const S&) {}
};
void a()
{
[i=0,
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
struct has_ctor
{
has_ctor(auto arg) {}
};
void aaa()
{
has_ctor{[]<(){}}; // typo intentional
}
-std=c+
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
struct foo
{
template void not_const() {}
};
void fn(const foo& obj) { obj.not_const<5>(); }
No flags needed.
:
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
https://godbolt.org/z/zra9GddY3
N4964 [thread.thread.id]/12 "If the align option is omitted it defaults to >."
Both MSVC and
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105667
Alfred Agrell changed:
What|Removed |Added
CC||blubban at gmail dot com
--- Comment
rmal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
struct X {
X(int&);
X(X&&) = delete; // the issue reproduces without this line, but the error
is clearer with
-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
bool g(const char* c) {
return __builtin_strcmp(c, ".") == 0 ||
__builtin_strcmp(c, "..") == 0;
}
bool h(const char* c) {
return
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115423
--- Comment #3 from Alfred Agrell ---
strcmp (c, "ABCDEFGHabcdefgh") || strcmp (c, "ABCDEFGHfoobar") can safely be
optimized to 1, you're thinking of strcmp(c, "ABCDEFGHabcdefgh")==0 ||
strcmp(c, "ABCDEFGHfoobar")==0.
Optimizing to multi-byte r
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115318
--- Comment #2 from Alfred Agrell ---
struct a { int c; };
template
struct ddd {
int f()
{
using a2 = decltype([](int a::*)->a{}(&a::c));
return [](int a2::*){ return 2; }(&a::c);
}
};
int xs() { return ddd().f(); }
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
int square(char* a, char* b) {
return !__builtin_memcmp(a, b, 4);
}
-Os
Expected:
square(char*, char*):
mov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116903
Alfred Agrell changed:
What|Removed |Added
CC||blubban at gmail dot com
--- Comment
P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
unsigned foo(char* buf, unsigned len)
{
while (len > 1)
len -= 2;
if (len)
*buf = 42;
retu
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
template
struct index_sequence {};
void foo()
{
index_sequence<5> bar = index_sequence<1>();
}
No f
P3
Component: sanitizer
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban 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
Target Milestone: ---
int m
: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
void* aaa();
void* bbb()
{
void* ret = aaa();
char buf[32] = {};
__builtin_memcpy(ret, buf, 32
: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
void* aaa();
void* bbb()
{
void* ret = aaa();
char buf[65536*16];
__builtin_memset(buf, 0, 32
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
class a {
private:
class b;
};
class a::b {};
void c(a::b&) {}
Expected:
: In function 'void c(a::b&)':
:
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
#include
#include
bool a1() { return std::is_same_v,
int(&)(int)>; }
bool a2() { return std::is_same_v,
int(&&)(int)>; }
bool a3() { return s
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
#include
#include
int main()
{
std::string s{"a"};
std::regex r{"(b)?\\1"};
std::smatch m;
bool result
++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
#include
#include
int main()
{
std::regex r{"\\cA"};
std::cmatch m;
bool result1 = std::regex_search("\x01", m, r);
printf("search=%d\n", re
45 matches
Mail list logo