All headers are explicitly required - corona points this out clearly.
More important - when you compile:
1.warnings cannot be there. Ever. Period.
2. use -Wall to identify problems - if not gcc, then use lint.
corona gave a great example why you cannot tolerate warnings.
Any implicitly defined (meaning it was not explicitly defined like
either in your code or in a header file)
is trouble waiting to happen. If your code happens to work for a while it is called 'coding by coincidence' and is both dangerous and hard to debug.
Please consider never running code that does not compile perfectly.
Ya, stdio.h is just a header. However, as of glib reference, I expected that its the usual reference to the set of c-libraries available under /usr/lib/* . Please re-confirm me, if its not.
Hello,
Long-time Unix hacker here - I've worked on four variants of the kernel prior to the introduction of Linux. In my spare time, I've written Linux (Ubuntu) device drivers, kernel modules, cross-compiled, and built the kernel.
I'd like to do Linux internals/device drivers as a day job,... (1 Reply)
When we put a breakpoint using gcc then what all things happen internally and how the gdb using break is able to pause the execution of process( instead of killing it ) and later on resume the process execution? (0 Replies)
Hi friends,
Hope everyone is doing well. Please have a look at this simple program, you will figure out what I want.
#include <stdio.h>
int main()
{
printf("Enter an integer!\n");
scanf( "%d", 134511890 ); // Valid address on my computer
printf( "%d\n", ???? );
return 0;
}
... (3 Replies)
Hello Gurus,
i am ok with the concepts of c language but i would like to know
more about the internals of c with respect to the compilers
what happens when we say
gcc filename.c
the a.out will get created(what actaully compiler does to the code inaddition to generating object code)
... (5 Replies)
Hi,
Does anybody have a good pointer on Linux kernel internals for ARM architecture? I can locate plenty for x86 but since ARM is RISC I think there would be subtle changes. So if somebody has a knowledge of good document on Linux Kernel internals for ARM or even a comparative study of kernel on... (0 Replies)
I use FreeBSD,and use signal,like follows:
signal(SIGHUP,sig_hup);
signal(SIGIO,sig_io);
when I run call following code,it can run,but I find a puzzled question,it should print some information,such as printf("execute main()") will print execute main(),but in fact,printf fuction print... (2 Replies)
Here is the code I'm using
{
printf("%11d %4.2f\% %4.2f\%\n", $1,$2,$3);
}
I want the output to look something like
1235415234 12.24% 52.46%
Instead it looks something like
319203842 42.27\%4.2f\%
How do I just print a "%" without awk or printf thinking I'm trying to do... (1 Reply)