Questions tagged [gcc11]

32 questions
1
vote
1 answer

Many "multiple definition of" errors shows up when compiling TPC-DS tools

I'm trying to compile TPC-DS tools (i..e Tools used to benchmark databases) but I'm seeing the following errors: $ make gcc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DYYDEBUG -DLINUX -g -Wall -o dsdgen s_brand.o s_customer_address.o…
Muhammad Gelbana
  • 3,890
  • 3
  • 43
  • 81
1
vote
1 answer

GCC compound literal in a C (GCC C11) Macro

After understanding that GCC supports Compound Literals, where an anonymous structure can be filled using a {...} initaliser. Then consider that gcc accepts (with limitations) variable length structures if the last element is variable length item. I…
Jay M
  • 3,736
  • 1
  • 24
  • 33
1
vote
1 answer

GCC 11.x vexing-parse + inconsistent error (redeclaration as different symbol type), is it a GCC bug?

The following code compiles with no problems from GCC 4.7.1 up to but not including GCC 11.1: constexpr int SomeValue = 0; void test () { void (SomeValue) (); } On GCC 11.x it fails with: :4:23: error: 'void SomeValue()' redeclared as…
Jason C
  • 38,729
  • 14
  • 126
  • 182
1
vote
1 answer

warning: '__builtin_snprintf' output may be truncated before the last format character [-Wformat-truncation=]

warning: ‘__builtin_snprintf’ output may be truncated before the last format character [-Wformat-truncation=] "%s", evspan->text); ^ len = strlen(evspan->text); evspan->ent->content = malloc(len+1); snprintf(evspan->ent->content, len, "%s",…
qwerty
  • 85
  • 2
  • 6
1
vote
1 answer

Templated operator=() and overload resolution

Consider the following code snippet: #include struct test { template test& operator=(Other&&); int& i_; }; int main() { int i = 0; test t1{i}, t2{i}; t1 = std::move(t2); // tries to select the…
Igor R.
  • 14,716
  • 2
  • 49
  • 83
1
vote
1 answer

Boost concept check warnings

Given this code using boost 1.75 / gcc 11 #include #include #include int main() { typedef boost::bimap bimap; bimap animals; animals.insert({"cat", 4}); animals.insert({"shark", 0}); …
Saad Rami
  • 81
  • 6
0
votes
0 answers

problem linking MUMPS to my own c++ code. relocation R_X86_64_32S against `.rodata.str1.1' can not be used when making a PIE object;

I am building a C++ project with dependency on MUMPS (sparse linear solver) but during compilation I get the following error: [build] /usr/bin/ld: /home/Thesis_project/installation/MUMPS_5.6.0/lib/libdmumps.a(dmumps_f77.o): relocation R_X86_64_32S…
NCLibardi
  • 1
  • 1
0
votes
1 answer

C - const qualifier discard when const void* is actually struct**

Stuck on "cast discards 'const' qualifier" I have a code: int cmp_str_and_dirent(const void *key, const void *elem) { const char *name = key; const struct dirent *de = *(const struct dirent**)elem; ^ Cast discards…
White Owl
  • 318
  • 1
  • 8
0
votes
0 answers

Compilation error: size of array element is not a multiple of its alignment

I am trying to compile MPICH 3.2 with GCC 11.3.1 in Rocky Linux 9 and I am getting multiple times the following error: error: size of array element is not a multiple of its alignment In the MPICH mailing list somebody solves it compiling with GCC 10…
Bub Espinja
  • 4,029
  • 2
  • 29
  • 46
0
votes
1 answer

A lot of "implicitly-declared '[...]::operator=([...])' is deprecated" error in the Opensplice when compiling with gcc11

I am using Opensplice library in my project and everything is working with gcc4. I am would like to compile my project with gcc11 but I get a lot of the same errors in the Opensplice section. For example: implicitly-declared…
0
votes
1 answer

Build Fails Using GCC-11 Due to Some Missing Standard Library Headers

After upgrading to gcc-11, which is shipped with Ubuntu 22.04, I started to get new compiler errors due to some missing Standard Library header files. Whereas previous gcc versions don't. When I started to look into it, I learned from Porting to GCC…
Analytiker
  • 41
  • 6
0
votes
1 answer

Brace initialization when move constructor is deleted

This is probably not specific to C++20, but that's what I'm using right now. I have a simple struct struct foo { int bar; } which can be declared and initialized as const auto baz = foo{42}; Now, when I disable the move constructor (foo(foo&&)…
Azad Salahli
  • 876
  • 3
  • 14
  • 30
0
votes
1 answer

Error using llvm-11 in combination with standard library headers from gcc-11 compiling with -std=c++2a

I am trying to use clang together with gcc standard library headers as follows: /opt/rh/llvm-toolset-11.0/root/usr/bin/clang -MD -MF bazel-out/k8-fastbuild/bin/external/com_google_googletest/_objs/gtest/gtest-typed-test.d…
user2672165
  • 2,986
  • 19
  • 27
0
votes
0 answers

compile sio_client and semaphore in c++

I can compile a program that uses only semaphores or one that uses only the sio_client websocket library. However, when compiling a simple program that contains both libraries, I deal with gigantic compilation problems that I don't even know how to…
Leonardo
  • 11
  • 2