c89
Declaring variables before use in old C
Recently I had to modify a legacy code that was compiled with a very old version of GCC (somewhere around version 2.3). Within a function, varia开发者_如何学编程ble had to be declared before being use[详细]
2023-04-08 21:20 分类:问答Linking Math library to a C90 code using GCC
I would like to compile a simple C90 code utilizing math library: main.c: #include <stdlib.h> #include <stdio.h>[详细]
2023-04-03 12:29 分类:问答C90: How do I globally initialize this struct in C without C99 extensions
I was wondering what the best way to initialize this struct is with C90, while still keeping it neat.[详细]
2023-03-18 18:44 分类:问答C Integral Overflow?
have a peek at this. The compiler is complaining that I have an integer overflow, but when I look at the C89 standard\'s rules for integral promotion along with the values in that expression, it seems[详细]
2023-03-18 15:12 分类:问答C89, Mixing Variable Declarations and Code
I\'m very curious to know why exactly C89 compilers will dump on you when you try to mix variable declarations and code, like this for example:[详细]
2023-03-16 01:02 分类:问答How to generate NaN, -Infinity and +Infinity in ANSI C?
I use ANSI C89 (not C++), and I want to generate NaN, -Infinity and +Infinity. 开发者_StackOverflow社区[详细]
2023-03-10 21:34 分类:问答Why doesn't GNOME use C99?
Looking at mutter source code and evince source code, both still use C89 style of declaring all variables at the very beginning of the function, instead of where it is first used (limited s开发者_JS百[详细]
2023-03-07 16:49 分类:问答What's a good way to check availability of __restrict keyword?
I am looking a set of #ifdef\'s to check availability of __restrict keyword for GCC and Visual Studio. I assume that it needs to check compiler version, but I don\'t know for which versions it was int[详细]
2023-03-04 15:52 分类:问答How can i pass a va_list through a function in C90
I want to pass a va_list through to another function. Here is an example of what i am trying to do: void my_printf_1(char* string, ...) {[详细]
2023-03-01 12:36 分类:问答C check if file exists
In a project I have to do in C89 standard I have to check if a file exists. How do I do this? I thought of using[详细]
2023-02-27 09:24 分类:问答