: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
__builtin_is_constant_evaluated() is not a constant expression when used in
array bounds or new expressions.
// g++ -fsyntax-only
++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
GCC fails to expand parameter packs when used in certain contexts. This is a
regression from 8.2.
https://godbolt.org/z/9MrTQQ
Reproducer:
// g++ -std=c++17
template struct T {};
template
ormal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
The following code is incorrectly rejected.
// g++ -std=c++14
struct T { T(const int&); };
void Func(T);
void test() {
constexp
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Reproducer:
// g++ -std=c++14
struct Foo {};
constexpr void test() {
Foo f; // error: uninitialized variable 'f' in 'constexpr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83921
--- Comment #3 from Eric Fiselier ---
The problem also reproduces when the empty type has an explicitly defaulted
default constructor. Example:
struct Foo { Foo() = default; };
constexpr void test() { Foo f; };
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
I believe the following code is valid and should be accepted.
// g++ -std=c++11
struct Foo {
template operator T() const;
};
// error
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86641
Eric Fiselier changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68975
Eric Fiselier changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65799
Eric Fiselier changed:
What|Removed |Added
CC||eric at efcs dot ca
--- Comment #4 from
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
When a type has trailing padding GCC generates an invalid copy
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90383
--- Comment #1 from Eric Fiselier ---
It's important to note that this bug affects any struct with tail padding. For
example `struct optional { T value; bool has_value; /*...*/ };` would hit it.
https://godbolt.org/z/VX9VTh
rmal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
According to the current specification, the error_code version of
directory_entry::refresh should be marked noexcept [1].
Libstdc++ incorre
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
The "file type observers" of directory entry like exists and is_regular_file
don't clear the error code they are given when n
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
In some situations, GCC will fail to resolve the storage size of auto variables
which are not not directly ODR used:
For example:
// std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77923
--- Comment #1 from Eric Fiselier ---
Ping. I keep hitting this more and more.
GCC seems to be warning because the declaration includes the CXX scope
specifier "::foo". Removing the "::" seems to work. However, removing the "::"
causes the code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Reproducer:
#include
template
constexpr int foo() {
if (sizeof(T))
return 1;
assert(false &&am
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86678
--- Comment #2 from Eric Fiselier ---
This is a bug according to [expr.const]p2 which states:
> An expression e is a core constant expression unless the evaluation of e,
> following the rules of the abstract machine, would evaluate one of the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86678
--- Comment #3 from Eric Fiselier ---
The `if (1)` isn't essential either.
void fail();
template
constexpr int foo() {
if (sizeof(T))
return 1;
fail();
}
constexpr int x = foo();
It seems to have something to do with whether
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78489
--- Comment #2 from Eric Fiselier ---
Created attachment 43737
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43737&action=edit
reproducer2.cpp
Another reproducer: This one is a regression from 7.3
https://godbolt.org/g/UEti9f
Could someb
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
// g++ -std=c++1z test.cpp
template
void test() {
[](auto rhs) { auto ptr = __PRETTY_FUNCTION__; }(42);
}
template void test<>();
The above code ICE's wit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87766
Eric Fiselier changed:
What|Removed |Added
CC||mpolacek at gcc dot gnu.org
Se
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Created attachment 37497
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37497&action=edit
reproducer.cpp
While developing for libc++ I enable warnings in the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69523
--- Comment #2 from Eric Fiselier ---
@Andrew I'm a libc++ developer and I really like using compiler warnings when
developing and testing libc++. Using -isystem prevents this entirely. Normally
they are system headers but this is explicitly turn
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Created attachment 37603
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37603&action=edit
reprodu
If a class "B&qu
: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Created attachment 37605
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37605&action=edit
reproducer.cpp
Hi Jonathan,
While running the libc++ filesystem tests
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69701
--- Comment #2 from Eric Fiselier ---
@Andrew The in-class diagnostics are pretty good. My concern is that users
outside the class cannot name the conversion operator. I don't think they care
that "A" changes meaning *within* B.
I don't think an
: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
resource_adapter incorrectly requires that the Allocator provide:
* A pointer typedef.
* A
: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Created attachment 38422
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38422&action=edit
example.cpp
The value returned from 'new_delete_resource()'
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Hi Jonathan,
The default ctor provided for recursive_directory_iterator won't allow it to it
to be constructed as
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71004
--- Comment #1 from Eric Fiselier ---
Additionally this seems to be affecting the value returned from
"recursion_pending()". The following code compiles and runs without asserting
on my machine.
#include
#include
using namespace std::experime
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Hi Jonathan,
The postfix increment operator returns the incremented value of the iterator,
not the previous one.
For example
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69523
--- Comment #5 from Eric Fiselier ---
Would it be possible to add a -Wno-literal-suffix flag? I really want to use
warning with GCC, but I need to disable this one.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71004
--- Comment #6 from Eric Fiselier ---
(In reply to Jonathan Wakely from comment #4)
> (In reply to Eric Fiselier from comment #1)
> > recursive_directory_iterator it;
> > assert(it.recursion_pending() == false);
> > assert(it.recursio
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
The create_directory functions should not report an error when the directory
they are trying to create already e
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
The filesystem error thrown from canonical only contains the first path, not
the base. Since the base path c
: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
The title says it all. copy_file always seems to return false.
Example:
#include
#include
#include
using namespace std::experimental::filesystem;
int main() {
std
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: inline-asm
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
The following code fails to compile with the error "inconsistent operand
constraints in an
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Created attachment 38585
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38585&action=edit
reproducer.cpp
filesystem::perm
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Created attachment 38586
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38586&action=edit
repr
Currently "permissions(sym, perms::none)" resolve
CONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Most of the time these two function will not throw. However if 'p' points to a
directory that th
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
GCC has recently implemented "noexcept as part of the type system" but the
feature test macro is not defined.
Reproducer:
void foo(
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
For example:
constexpr int n[42] = {1};
constexpr int x = n ? 1 : 0; // Accepted.
constexpr int xx = n + 1 ? 1 : 0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71537
--- Comment #2 from Eric Fiselier ---
Hi Martin,
The 'xx' case is only accepted if it occurs at a global scope. If it appears
in a function body it is still rejected.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69523
--- Comment #7 from Eric Fiselier ---
> The warning should be controlled by *some* flag, but I'm not sure whether or
> not linking it with -Wliteral-suffix makes sense. I'll prepare a patch and
> see what people think.
Any update? I would be h
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Simply including fails to compile when using Clang.
The first error in the stack is:
/opt/gcc-tot/lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Reproducer:
// g++ -fsyntax-only -std=c++1z test.cpp
int foo(...);
int main() {
[](auto a) noexcept(noexcept(foo(a))){}(42
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80564
Eric Fiselier changed:
What|Removed |Added
CC||eric at efcs dot ca
--- Comment #1 from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80564
--- Comment #2 from Eric Fiselier ---
Note that explicitly providing a return type for the lambda avoids this compile
error. Example:
---
#include
int main() {
int i;
std::bind([] (auto& x) -> void {x = 1;}, i)(); // OK!
}
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80564
--- Comment #3 from Eric Fiselier ---
Here is an example of why `_Bind::operator()(...) const` must be considered
during overload resolution even if the call wrapper itself is not const.
--
#include
struct Func {
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Reproducer:
// g++ -std=c++11 -fsyntax-only
static_assert(!__is_trivially_constructible(void, int), "");
This seems blatantly incorrect.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68905
Eric Fiselier changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
GCC ICE's when default initializing a type T when T's default constructor is an
inherited constructor. Note that this only happens when T does
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78488
--- Comment #1 from Eric Fiselier ---
> GCC 6 exits with status 1 and without producing any diagnostics or an output
> file
Disregard that I was using a broken GCC 6. IDK how GCC 6 handles this bug.
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
When substitution failure occurs in the declaration of a NTTP GCC
will incorrectly continue to perform substitution on later template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78489
Eric Fiselier changed:
What|Removed |Added
Summary|Subsitution failure does|Substitution failure does
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64372
Eric Fiselier changed:
What|Removed |Added
CC||eric at efcs dot ca
--- Comment #9 from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71537
Eric Fiselier changed:
What|Removed |Added
CC||jason at redhat dot com
--- Comment #3 f
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78441
Eric Fiselier changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71537
Eric Fiselier changed:
What|Removed |Added
CC||jason at gcc dot gnu.org
--- Comment #4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004
Bug 55004 depends on bug 71537, which changed state.
Bug 71537 Summary: GCC rejects consetxpr boolean conversions and comparisons on
the result of pointer arithmetic.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71537
What|Removed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71537
Eric Fiselier changed:
What|Removed |Added
Status|RESOLVED|REOPENED
Resolution|FIXED
ty: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Link to paper:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0393r3.html
Reproducer:
// g++ -std=c++1z test.cp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78723
--- Comment #3 from Eric Fiselier ---
The joke title was a lot funnier a year ago.
t: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
The following example doesn't compile when using Clang to target libstdc++
Minimal reproducers:
// clang++ -std=c++1z test.cpp
#include
int main()
{
std
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79452
Eric Fiselier changed:
What|Removed |Added
CC||eric at efcs dot ca
--- Comment #7 from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79452
--- Comment #9 from Eric Fiselier ---
I think it would be nice to be able to dispatch differently depending on being
called at compile time or runtime. However the ability to dispatch on that
condition doesn't have to be usable in "if constexpr".
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69523
Eric Fiselier changed:
What|Removed |Added
Status|RESOLVED|REOPENED
Resolution|FIXED
++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Assignment to optional from {} acts differently depending on if 'T' can be
constructed from {} without a used defined conversion. If so then then
operator=(U&&) is s
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
I ran into this error defining a typedef for "struct ::stat" where "stat" names
both a function and type on POSI
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
The copy/move assignment operators generated by GCC result in compile time
error when used in a constant expression
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69523
Eric Fiselier changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77945
--- Comment #3 from Eric Fiselier ---
> if the type contains trailing padding bytes (but one bytes between members).
The last bit is nonsense. I meant to say that padding between members seemed
OK.
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Reproducer:
// g++ -std=c++14 -Werror test.cpp
#include
using std::chrono::operator ""h; // error emitted on this line.
// {{error: litera
ormal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
The below reproducer fails to compile.
// Reproducer
#include
using V = std::variant;
using T = std::variant_alternative_t<0,
ponent: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
See the below reproducer:
#include
constexpr bool test() {
std::variant v(42);
auto const& cv = v;
static_assert(std::get<0>(v) == 42, "")
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78442
--- Comment #2 from Eric Fiselier ---
I'm sorry your right. That's a garbage reproducer. Here's an actual one:
#include
#include
constexpr bool test_tuple() {
std::tuple t(42);
return std::get<0>(t) == 42;
}
static_assert(test_tuple(), "");
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Currently GCC does not ignore cv-qualifiers applied to a function type.
Example:
typedef void T();
static_assert(std::is_same::value, "");
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66150
Eric Fiselier changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Created attachment 37034
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37034&action=edit
reproducer.cpp
The __is_trivially_copyable
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
GCC currently hangs when compiling the attached reproducer. The reproducer is a
stripped down libc++ test that ensures that &quo
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68929
--- Comment #1 from Eric Fiselier ---
Created attachment 37044
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37044&action=edit
reproducer.cpp
standalone reproducer
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
`__typeof__` does not make a good replacement for `decltype` because it doesn't
deduce references. It would be nice if decltype were provided
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Created attachment 37396
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37396&action=edit
reproducer for array types
The current C+
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69372
--- Comment #1 from Eric Fiselier ---
Created attachment 37397
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37397&action=edit
reproducer for function types
attached a reproducer for function types.
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Created attachment 37398
--> https://gcc.gnu.org/bug
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Created attachment 37399
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37399&action=edit
re
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
The __atomic_load builtin takes a pointer to an output parameter. Obviously the
output parameter cannot point to a const object. Unfortunatly GCC doesn't
diagnose this ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71376
--- Comment #2 from Eric Fiselier ---
I was wrong about the "GCC has recently implemented "noexcept as part of the
type system"" part. Closing as invalid.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71376
Eric Fiselier changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69523
--- Comment #8 from Eric Fiselier ---
Created attachment 39069
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39069&action=edit
fix.patch
Add a suggested fix with make -Wno-literal-suffix suppress the reserved
identifier warnings.
@Jonath
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Created attachment 59005
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59005&action=edit
stack trace
```
// g++ -fcontracts -std=c++26
template
void foo()
[[
91 matches
Mail list logo