gcc: strange asm generated for simple loop
m68k-linux-gnu-gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0 CFLAGS = -Wall -Werror -ffreestanding -nostdlib -O2 -m68000 -mshort I am very confused why gcc generates such (seemingly) non-optimal code for a...
View ArticleFail to install facemorpher on Ubuntu 18.04
I have a Ubuntu 18.04 and executed the packages from requirements.txt in the following Github repository https://github.com/alyssaq/face_morpher.While installing facemorpher using the following command...
View ArticleHow to find out GCC -march and -mtune options on installed lubuntu?
I am trying to run yocto warrior image on my device. A device has following configuration:Chipset Architecture : Intel NM10 express OS : Yocto warrior CPU : Atom D2250 Dual Core Volatile Memory : 2GB...
View ArticleGCC: Specified bound depends on the length of the source argument
The following code:while (node) { if (node->previous== NULL) break; struct Node* prevNode = node->previous; len = strlen(prevNode->entity); //pp is a char* fyi pp-=len; strncpy(pp,...
View ArticleFailed to do 'make' on .c and .s files using Mac
I'm trying to compile a simple project with .c and .s files using my Mac. When I run 'make' it goes threw on the compilation, and I think it failed when its trying to link (not sure).Here is the error...
View ArticleWhy class template below compile in Visual Studio 2019 and does not with gcc...
Why code below compile in Visual Studio 2019 and does not with gcc 8.3? #include<array> template<typename T> class myClass { public: template<unsigned int N> myClass(const...
View ArticleTyping g++ --version is showing the wrong version in windows
I am on Windows 7, installed MinGW a while ago, now I need to use it but I need g++ version 5.4.0 and above. So I went into MinGW Installation Manager and updated mingw32-gcc-g++ to the latest...
View ArticleUndefined reference with GLUT for MinGW
Here is my directory:graphics/ glut.h glut32.dll glut32.lib simple.c Here is my program:#include <windows.h> #include <GL/gl.h> #include <GL/glext.h> #include "glut.h" void...
View ArticleHow to load a avx-512 zmm register from a ioremap() address?
My goal is to create a PCIe transaction with more than 64b payload. For that I need to read an ioremap() address. For 128b and 256b I can use xmm and ymm registers respectively and that works as...
View ArticleHow to circumvent format-truncation warning in GCC?
I'm getting the following gcc format-truncation warning:test.c:8:33: warning: ‘/input’ directive output may be truncated writing 6 bytes into a region of size between 1 and 20 [-Wformat-truncation=]...
View ArticleBootloader Strategy for Corrupt Applications
I've implemented a bootloader for a Kinetis ARM Cortex-M4 microcontroller.The main application (starting at 0x10000) is re-programmed via the bootloader over a custom RS232 interface. I've implemented...
View ArticleInclude error when building TensorFlow from source with a different GCC than...
I have been trying to build TensorFlow 2.0 from the master branch on a Red Hat Linux Enterprise edition cluster.The default GCC available is 4.8.5, and it is not possible to compile TensorFlow with it...
View ArticleRst packets sent with libnet do not reset the connection
I am trying to do 'rst hijacking' by using a c script with libcap and libnet included. I use libcap to sniff all packets coming from and going to a host given as input to the program via the...
View ArticleHow can you fix the double free or corruption (out) Error in C in this occasion?
sadly I haven't been able to fix my issue, even after long searches online.C - GNU GCC on Linux (the code works (sometimes) with mingw on Windows 10)I have some structs, containing coefficients and...
View Articlegcc on macOS is running from /opt/local instead of /usr/bin
I was trying to upgrade my gcc version using brew and copying the new version file to usr/bin by using: sudo ln -s /usr/local/Cellar/gcc/9.3.0/bin/c++-9 /usr/bin/c++ sudo ln -s...
View ArticleOpenCL compilation issue
I am new to Opencl Programming. I have written a matrix multiplication program while compiling it is giving me error My include files are:#include <fcntl.h> #include <stdio.h> #include...
View ArticleAlternative way to write gcc attributes for functions for C++ functions?
Is there an alternative to write this in C++? I am curious if there is a way to maintain the readability without using the pre-processor macro. This is C++ 2014.#define FUNC_ATTRIBUTE __inline__...
View Article__restrict pointer aliasing with only one pointer
Is there any advantage to specifying the MSVC/GCC non-standard __restrict qualifier on a function pointer parameter if it is the only pointer parameter? For example,int longCalculation(int a, int*...
View ArticleCython openMP macOS... no build
I m fight 3 days now, to setup my venv... I need cython, openmp.... My IDE is PyCharm Prof in macOS... I have try a plenty of solutions with no resutl...when i try to build with PyCharm... the result...
View Articlehow to succesfully compile python 3.7
Upon attempting to compile python 3.7 I hit Could not import runpy module: jeremyr@b88:$ wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz .... jeremyr@b88:~/Python-3.7.3$ ./configure...
View Article