gcc4.7 Questions
3
I use -Wall and updating to new gcc I have got a lot of warning: narrowing conversion. I want to disable them, but leave all other warnings untouched (ideally).
I can find nothing about narrowing ...
Professional asked 30/11, 2013 at 16:24
4
I'm recompiling some executable for Android 5.0 as it requires executables to be PIE. I was able to recompile it for ARM with just adding some arguments while configuring (with standalone toolchain...
Mylonite asked 22/11, 2014 at 21:50
9
Solved
In theory, I should be able to use a custom pointer type and deleter in order to have unique_ptr manage an object that is not a pointer. I tried the following code:
#ifndef UNIQUE_FD_H
#define UNI...
Convention asked 2/4, 2013 at 5:43
3
In boost::interprocess documentation it is said as requirement for containers to be stored in shared memory:
STL containers may not assume that memory allocated with an allocator can be deallocat...
Impassable asked 8/3, 2013 at 15:54
2
Consider this function compiling with g++ -std=c++11 (GCC 4.7.2):
boost::uuids::uuid getID()
{
static boost::uuids::random_generator generator;
return generator();
}
Is it safe to call getID f...
Wisdom asked 19/9, 2013 at 8:59
2
I am trying to compile a program using a self-compiled GCC-4.7.1 on Mac OS 10.8.2. The program uses openMP and the compilation succeeds; however, when I try to run the program, the dynamic linker c...
Ullage asked 16/11, 2012 at 10:30
5
Solved
I've been developing with CentOS, Qt 4.7, and GCC 4.4
I've just installed Red Hat Developer Toolset 1.1 which includes GCC 4.7.2, and at the end of make, I get an error
/usr/bin/ld: ../../bin/So...
1
Solved
What are the features that I can use in c++ freestanding environment? I am developing a little kernel (for my own pleasure) and I know that I can't use the whole stdlib library, but what else ? whe...
Worldling asked 24/2, 2017 at 14:54
2
Solved
I am getting this error every time, while compiling programs, configuring and installing some things like binutils, textinfo, etc.:
/usr/local/bin/ld: this linker was not configured to use sysroots...
Desolate asked 8/5, 2013 at 9:42
1
Solved
The gcc info file says in the section on x86-64 specific flags, among
other things:
There is no `-march=generic' option because `-march'
indicates the instruction set the compiler can use, and ther...
1
While testing some functionality with std::thread, a friend encountered a problem with GCC and we thought it's worth asking if this is a GCC bug or perhaps there's something wrong with this code (t...
Sarthe asked 4/8, 2014 at 9:9
2
Solved
Here is a piece of code that I've been trying to compile:
#include <cstdio>
#define N 3
struct Data {
int A[N][N];
int B[N];
};
int foo(int uloc, const int A[N][N], const int B[N])
{
...
1
I'm trying to, at compile time, select a type to use depending on whether one is publicly available in a given scope. It's best to go straight to the code:
#include <iostream>
#include <t...
1
I recently installed GCC 4.7.3 and GDB 7.6 on my OS X 10.7 system via MacPorts to be able to compile C++11 code. I cannot use Apple's selfmade clang++ and gdb since it doesn't allow me to debug sta...
1
Solved
1
Solved
The title says it all.
I'm using GCC 4.7.1 (bundled with CodeBlocks) and I faced a strange issue. Consider this:
int main() {
unsigned char a = 0, b = 0, c = 0;
scanf("%hhu", &a);
printf("a...
3
Solved
So accurate timing is important to me, and I was investigating the 3 types of clocks specified in C++ 11, namely system_clock, steady_clock, and high_resolution_clock.
My initial concern was testi...
1
Solved
I am trying to compile my project where I've declared as class members some:
icu::UnicodeString label;
icu::UnicodeString tags;
icu::UnicodeString domain;
icu::UnicodeString data;
After having i...
Levity asked 14/2, 2013 at 12:36
2
Solved
I'm having trouble using map::emplace(). Can anyone help me figure out the right syntax to use? I am effectively trying to do the same thing as in this example. Here is my version:
#include <ma...
2
Solved
I'm trying to compile GCC 4.7.2 on a Buffalo LinkStation Pro Duo (after unlocking it) which runs Linux 2.6.31.8 armv5tel.
Unfortunately, make throws quite some errors, starting with
gcc -c -DIN_G...
Hartzog asked 13/12, 2012 at 9:57
1
The code below compiles fine with clang, but does not compile with GCC (tried 4.1.2, 4.5.4 and 4.7.2):
template <typename T>
struct A
{
struct B { };
};
template <typename T>
bool op...
3
Here's code that produces different output in g++ 4.7 and vs2012 (cl17).
#include <iostream>
using namespace std;
class A
{
public:
A() { cout << "1" << endl; }
~A() { cout &...
Gobert asked 14/11, 2012 at 8:4
4
Solved
I've been playing with user defined constants in gcc 4.7.2 and ran into some sort of size limiting factors which I do not quite understand.
The idea was to define a constexpr operator "" for fixed...
2
When I try to use std::distance with a custom iterator under gcc 4.7, it complains about not finding the difference_type. I have sadly no idea why it fails.
#include <iterator>
class nit {
...
1
Solved
Here's what I am trying. MinGW g++ 4.7.0.
#include <iostream>
#include <string>
class Fruit
{
public:
enum Value { APPLE, ORANGE, BANANA, NONE };
static const Value VALUES[4] = { AP...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.