Questions tagged [compiler-bug]

For questions about (suspected) incorrect behavior of a compiler. Use with the appropriate language tag and, where applicable, with the tag for the compiler in question.

309 questions
0
votes
1 answer

gcc/g++ internal error (c++ templated lambda)

i was just making a few changes to my program, when all of a sudden g++ complained with an internal compiler error. Clang however compiles it without any problems and also does not give any warnings, that would indicate anything weird. I distilled…
Lazarus535
  • 1,158
  • 1
  • 8
  • 23
0
votes
2 answers

C++ comparison operator not returning true or false

I have following program int a = 216; bool* v = (bool*)((void*)&a); std::cout << (*v == true) << endl; I would expect this program to print out true or false but instead it prints out 216. I have compiled it with g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2.…
Trismegistos
  • 3,821
  • 2
  • 24
  • 41
0
votes
1 answer

Compiler warning when passing NSError ** as a method parameter

I've been scratching my head about this for the last 4 hours, trying out all kinds of little experiments, but I can't seem to figure out what's going wrong. Could this be a compiler bug? Test.m: - (id)initWithContentsOfURL:(NSURL *)aURL…
splicer
  • 5,344
  • 4
  • 42
  • 47
0
votes
1 answer

G++ error while playing with variadic templates

//class we're trying to generate template class A { public: A() { std::cout << a << "," << (int)b << std::endl; } }; //class which generates information template struct B { typedef T value_type; static…
IdeaHat
  • 7,641
  • 1
  • 22
  • 53
0
votes
0 answers

Did I find a Scala compiler bug?

In Scala 2.9.1, this does not compile, failing with not found: value b: case class CaseClass(field: String) object SomeObject { //val kludge = field def x(input: (CaseClass, String) => CaseClass): Unit = () val field = x((a, b) =>…
Mark
  • 5,286
  • 5
  • 42
  • 73
-1
votes
1 answer

Getting "instantiation resulted in unexecpted type" with MSVC

In a library of mine, I have the following bit of code (snipped for brevity): namespace memory { namespace managed { namespace detail { template inline T get_scalar_range_attribute( region_t region, cudaMemRangeAttribute…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
-2
votes
1 answer

variable initialized wrong

i got a very strange problem with a variable that has name 'val'. I will try my best to explain it. I cannot make any small code example that do the same issue and my project is very big so can't upload it here also. The code i try is (part of…
mod Zz
  • 49
  • 6
-2
votes
1 answer

How is this Intel Xeon mov instruction corrupting my application's memory?

I have an application built with gcc v7.3.0 and executing on an Intel(R) Xeon(R) CPU E3-1220 v6 chip that corrupts stack memory deterministically and gets a SEGV due to executing a mov instruction. I ran valgrind and no memory corruption was…
WilliamKF
  • 41,123
  • 68
  • 193
  • 295
-2
votes
1 answer

Possible Visual Studio 2015 C++ Compiler and IntelliSense Bugs

I encountered a compiler crash and intellisense false positives with Visual Studio 2015 using C++. This crashes the compiler when written within a function block: if(); This is the dialog that is shown when compiling (I am on a German version of…
Beta Carotin
  • 1,659
  • 1
  • 10
  • 27
1 2 3
20
21