Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: yaghmour.shafik at gmail dot com
Target Milestone: ---
Given the following code
char* ch4 = true ? 0 : nullptr;
and compiling with the following flags
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87275
--- Comment #3 from Shafik Yaghmour ---
Note, I have filed similar bugs for clang:
https://bugs.llvm.org/show_bug.cgi?id=38420 and MSVC:
https://developercommunity.visualstudio.com/content/problem/304122/unsequenced-modifications-of-variable-with
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64372
--- Comment #11 from Shafik Yaghmour ---
Bumping, it has been a while.
I ran into this reviewing [diff.cpp11.expr]
https://timsong-cpp.github.io/cppwp/n4659/diff.cpp11.expr and noticed the code
in the example similar to the reduced sample fails
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: yaghmour.shafik at gmail dot com
Target Milestone: ---
Given the following C++ example:
void foo() {
constexpr char c1 =
(&(&&quo
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: yaghmour.shafik at gmail dot com
Target Milestone: ---
This Stackoverflow question https://stackoverflow.com/q/33161003/1708801
provides the following code:
using Y = int[10];
int
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: yaghmour.shafik at gmail dot com
Target Milestone: ---
Given the following code:
#include
#include
#include
int main() {
printf( "%d\n", abs(INT_MIN) ) ;
}
and comp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83433
--- Comment #3 from Shafik Yaghmour ---
I still think it is awkwardly worded but your second point is valid about it
only warning on comparisons.
Please, feel free to close.
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: yaghmour.shafik at gmail dot com
Target Milestone: ---
Given the following example:
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-var
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: yaghmour.shafik at gmail dot com
Target Milestone: ---
Given the following code:
#include
int main()
{
int length = 0;
size_t n;
n = static_cast(length
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: yaghmour.shafik at gmail dot com
I expected the following code involving constexpr to generate errors since all
the shifts invoke undefined behavior:
int main()
{
constexpr int
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55986
--- Comment #5 from Shafik Yaghmour ---
It looks like this case from this Stackoverflow question
http://stackoverflow.com/q/32920229/1708801 is possibly related:
int main(int argc, char**)
{
constexpr int a = argc * 0;
}
gcc treats `argc *
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: yaghmour.shafik at gmail dot com
Target Milestone: ---
Given the following code:
#include
int main()
{
void (*) {}
We could go on and on
line after line
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49813
Shafik Yaghmour changed:
What|Removed |Added
CC||yaghmour.shafik at gmail dot
com
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: yaghmour.shafik at gmail dot com
Given the following code form this stackoverflow question
http://stackoverflow.com/q/27507361/1708801 :
#include
struct X
{
X(bool arg
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65327
Shafik Yaghmour changed:
What|Removed |Added
CC||yaghmour.shafik at gmail dot
com
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: yaghmour.shafik at gmail dot com
Given the following code:
class Var
{
public:
operator int () const
{ return 0; }
template
operator T () const
{ return T
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: yaghmour.shafik at gmail dot com
Given the following code:
int x;
int main() {
int(::x); //does not compile
int(::x + 2); //compiles
}
gcc 4.9 will compile it without an error while gcc 4.8.x and clang 3.4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62116
--- Comment #2 from Shafik Yaghmour ---
I am happy to be mistaken here, but it seems like section 6.8 paragraph 1
applies, for example if we have the following:
int(y) = 10;
it is being treated as a declaration not a cast and further more secti
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: yaghmour.shafik at gmail dot com
Target Milestone: ---
Given the following simplified example from this Stackoverflow question
http://stackoverflow.com/q/28053640/1708801
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68604
--- Comment #2 from Shafik Yaghmour ---
Wandbox has clang 3.8 and we can see that clang accepts this in C++11 mode:
http://melpon.org/wandbox/permlink/IzawQ5DDLFyIyQNo
but not in C++03 mode: http://melpon.org/wandbox/permlink/IzawQ5DDLFyIyQNo.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55986
Shafik Yaghmour changed:
What|Removed |Added
CC||yaghmour.shafik at gmail dot
com
21 matches
Mail list logo