Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
0 answers
41 views

I'm trying to set up VS Code to learn C++. I downloaded the latest version of the compiler (g++) and tried running the following simple code, which (if I understand this correctly) should print a &...
2 votes
2 answers
84 views

GCC's -Wunused-parameter warns about unused function parameters. Is there a way to disable this warning for empty functions?
xuhdev's user avatar
  • 9,634
-2 votes
1 answer
394 views

Compiling Lua (version 5.4.7) with the GCC 15.2.0 compiler as C++, I get a strange warning message ...\lauxlib.c|586|warning: 'memcpy' specified bound 18446744073709551614 exceeds maximum object size ...
AVK's user avatar
  • 2,178
0 votes
0 answers
121 views

I tried to implement a method caller for vectors to forward it to a class method taking scalars. E.g. if I have a class with a method taking a double and an integer I want to be able to call it with a ...
Max's user avatar
  • 700
1 vote
1 answer
79 views

I have an array of pointers to structs in C as typedef struct{ int elem1; char *elem2; ... }example_t; example_t *array[MAX_SIZE]; I did generic functions for add or delete pointers to ...
1 vote
0 answers
225 views

As of version 15.1 GCC frequently reports -Wnull-dereference warning for functions known to return NULL. This is a useful warning and has exposed some potential null-pointer de-references in the code-...
ideasman42's user avatar
  • 49.4k
0 votes
1 answer
82 views

I'm trying to compile an example program from chapter three of Volume One of the Xlib Programing manual. I get an error saying that there is no such file or directory for #include "bitmaps/...
2 votes
1 answer
81 views

The following C snippet, when compiled with ARM GCC 13.2.1 (Godbolt link): #include <stdint.h> #define LEDLINE_LED_COUNT 5 // LED delay buffer parameters; adjust the first two if you ...
Jason C's user avatar
  • 40.6k
1 vote
1 answer
102 views

This question can be considered probably theoretical as I don't see why I would have such design in real code. I've got two classes with some conversion operators: class B; class A { public: A()...
3 votes
1 answer
102 views

I am working on a project that contains a firmware update failure feature that : notifies user/host that firmware update failed whenever the device gets unplugged in the middle of a firmware update ...
5 votes
2 answers
195 views

I've been compiling my C code against some very "non-default" warnings and found a potential GCC bug - a false positive caused by -Wc++-compat. Before explaining anything, it would probably ...
3 votes
3 answers
159 views

Consider the following example: a.c: #include <stdlib.h> #include <fcntl.h> #include <stdarg.h> #include <stdio.h> char *invocation_name; static void handle_error(const char* ...
4 votes
1 answer
327 views

In our codebase we have code that boils down to the following (trying to use dynamic stack allocation instead of heap allocation): #include <memory> #include <alloca.h> void f(long long ...
akryukov's user avatar
  • 187
2 votes
2 answers
370 views

When enabling -Wabi-tag I get the warning when trying to return std::string (by value). What is the purpose of this warning, ie what harm could ignore it lead to? What options are there for avoiding ...
skyking's user avatar
  • 14.6k
3 votes
2 answers
121 views

As we all know and love (or hate), GCC has the capability of issuing warnings when you attempt to use the printf() family of functions with mismatched type specifications. In our code, we have a ...
Ken P's user avatar
  • 580

15 30 50 per page
1
2 3 4 5
...
58

AltStyle によって変換されたページ (->オリジナル) /