Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Posts tagged compiler-warnings
I have a very simple source file -- HelloWorld.java public class HelloWorld { public static void main(String[] args) { System.out.println("hello world"); } } I have th...
I'd like to assert that some code can be optimized out, and is not present in the final binary object. #define CONSTANT 0 #if (!CONSTANT) [[landmine_A]] #endif static int foo(void); void...
When reading questions about C programming from beginners, I very often see them describing peculiar run-time errors and crashes, segmentation faults and similar. They have spent a lot of time chas...
#include <iostream> using namespace std; int linearSearch(int array[], int n, int key){ for(int i=0;i<=n;i++){ if(array[i]==key){ return i; } } } int main() { int ...
In the C program below, I make a mistake and call the function with (ld, ld) instead of (d, ld). #include <stdio.h> #include <limits.h> void print_int_long(int n, long l){ pri...
tl;dr I'd like to learn a compact, cross-compiler way of selectively suppressing compiler warnings. Consider the case where you really mean to make an exact floating-point comparison using ==, o...