C scope and struct definitions7151 (6/22/2012 5:30:41 PM) comp.lang.c The discussion about scope in the "What a stupid gcc" thread reminded me of
the one time (that I recall) where I was bitten by this. I don't recall the
specifics, but it had to do with a function that was ... Kenneth
Rejecting connection attempts on socket15112 (5/22/2012 4:02:07 PM) comp.unix.programmer I've searched and searched, and I have a feeling the answer is "you can't", but I figured I'd ask here just in case I missed something. I have a socket, I've bound it to a port, and entered a listening state.... Kenneth
Expanding macros within #error341 (12/22/2011 7:55:03 PM) comp.lang.c Is it possible to have #error expand macros? For example, something like: #if FOO == 1 ... something ... #elif FOO == 2 ... something else ... #elif #error Unknown value of FOO -- [value of ... Kenneth
Unions / unsigned char[]534 (9/8/2011 4:28:21 PM) comp.lang.c Okay, I can't find C&V, but as I recall, accessing a union via anything other than the one last written to is UB. For example: my_union.my_int = i; f = my_union.my_float; However, I believe that y... Kenneth
Random thought -- EOF and errno2724 (8/12/2011 4:04:43 PM) comp.lang.c A stray thought wandered into my head this morning... Given that 7.5p4 reserves macros that begin with E+digit or E+capital-letter for error codes, what allows the Standard to also define EOF in a manner unr... Kenneth
Version-checking macro940 (7/8/2011 6:42:28 PM) comp.lang.c This is one of those "it works on my compiler, but I want to verify that it's 'legal and defined' as far as C is concerned" types of things. I am writing a macro which I will be using as a version check, as i... Kenneth
volatile parameters and returns2339 (8/4/2010 1:09:03 PM) comp.lang.c The thread "volatile Info" posed a question about a function with a volatile
parameter. At first, I was surprised that the syntax was even valid. (I
suppose it's more of "why should the Standard prohibit ... Kenneth
Forcing compile-time error10132 (6/11/2010 1:53:11 PM) comp.lang.c I know about the #error directive, but it can't be used in this case...
I am replacing calls to an outdated system function with a new wrapper
function which can be updated as needed. (ie: if the "new" sy... Kenneth
Darn default-int (minor vent)1536 (9/24/2009 3:08:22 PM) comp.lang.c So, whose idea was "default int"? I just fixed a bug resulting from "someone" changing: register char *p1, *p2; to register char *p1; register *p2; Not a peep from the compiler. Fortunately, ... Kenneth
Functions not matching prototypes, redux730 (5/13/2009 4:38:41 PM) comp.lang.c Okay, here's a variation on my question posted previously under the subject "Why is this not an error in Visual C?" Here is a new source file: ===== extern int foo(void); int before(void) { ... Kenneth
Command line arguments13631 (1/10/2013 8:58:16 PM) comp.lang.c I've just discovered that a single command line argument containing
wildcards, such as *.c, is expanded to a full list of matching files before
it gets to main().
That isn't really what I want (and there c... bc(2211)
IF-free conception.14637 (2/15/2013 8:51:47 PM) comp.lang.c Good Time to all, Amici(Friends).
Here, i'd like to discuss how to reduce conditional branches in the code. 1st of the all, i would like to share some tricks. Their description is here (http://alg0z.blogspot... z0dchiy8(45)
graphic.h not found error67 (4/18/2013 4:04:27 AM) comp.lang.c hi
i am new in c programing i use gcc compiler and i have error graphic.h not found
how can i solve this.
... jvmukti(1)
gcc 4.8 and SPEC benchmark821 (4/19/2013 2:24:39 PM) comp.lang.c Hi group,
with the 4.8 release gcc announces that it'll break some code of which
the correct compilation relied on UB:
http://gcc.gnu.org/gcc-4.8/changes.html
Namely, the SPEC 2006 is broken in that rev... dfnsonfsduifb(1163)
Why does write() to stdin work?365 (4/23/2013 1:59:59 PM) comp.lang.c Tried the following code under gcc and it writes to stdin??
#include
#include
int main()
{
int k;
for(k= 0; k < 4; k++)
write(k, "Hello world!\n", 13);
}
Any poiners?
-ishwar
... ishwar.rattan(8)
struct padding is slower than struct packing195 (5/2/2013 11:17:02 PM) comp.lang.c Hi all,
As far as I understand, struct padding is implemented in order to speed up =
the execution of a program. I did this small example below in order to veri=
fy this issue. However, surprisingly, my pr... diegotorquemada1(81)
Embarcadero C/C++ Compiler available245 (5/3/2013 4:40:35 PM) comp.lang.c Hi:
If you would like to test/try out the new 'Borland' C/C++ Compiler
(from Embarcadero) BCC 6.6.0, there is a link below.
This console-only compiler was extracted from the C++ Builder package... med_cutout_syntel(718)
Odd printf() Behavior127 (5/7/2013 11:02:34 PM) comp.lang.c Hello, I'm working on some graphics routines and just started trying to
read in some bitmap files. For troubleshooting, I'm printing out various
values to make sure they're all okay.
I have two globals a... aaa97(8)
pointer doubt (1)212 (5/8/2013 6:46:58 PM) comp.lang.c Can ne1 explain me the difference between.... a NULL pointer ... and a
VOID pointer.
With Many Thanks.
... nospam21(11322)