int 0x80



gorlist@int0x80:~$ cat news.txt

gnu89
I had an argument about whether gcc uses c89 or gnu89 by default.

Quoting gcc's manpage:
-std=
Determine the language standard. This option is currently only
supported when compiling C or C++. A value for this option must be
provided; possible values are

c89
iso9899:1990
ISO C90 (same as -ansi).

iso9899:199409
ISO C90 as modified in amendment 1.

c99
c9x
iso9899:1999
iso9899:199x
ISO C99. Note that this standard is not yet fully supported;
see for more infor-
mation. The names c9x and iso9899:199x are deprecated.

gnu89
Default, ISO C90 plus GNU extensions (including some C99 fea-
tures).

gnu99
gnu9x
ISO C99 plus GNU extensions. When ISO C99 is fully implemented
in GCC, this will become the default. The name gnu9x is depre-
cated.

The GNU extensions for the C programming language can be found here:
http://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html#C-Extensions
0 Comments
Posted on 18 Dec 2007 by gorlist

int main(void)
Quoting the c99 standard:
5.1.2.2.1 Program startup
1 The function called at program startup is named main. The implementation declares no
prototype for this function. It shall be defined with a return type of int and with no
parameters:
int main(void) { /* ... */ }
or with two parameters (referred to here as argc and argv, though any names may be
used, as they are local to the function in which they are declared):
int main(int argc, char *argv[]) { /* ... */ }
or equivalent;9) or in some other implementation-defined manner.

So in C, int main(void) is the only acceptable way of declaring main() in case that it takes no arguments.
In C++, int main() is the equivalent of C's int main(void).

int main() is different from int main(void).
int main() means that it takes an unknown number of arguments, as opposed to int main(void) which means that it takes no arguments.

More here:
http://www.research.att.com/~bs/bs_faq2.html#void-main
http://users.aber.ac.uk/auj/voidmain.shtml
0 Comments
Posted on 15 Dec 2007 by gorlist

Name mangling
After much delay, the first paper is ready.

The title is "Name mangling demystified" and it discusses name mangling, a technique used by compilers in order to support overloading.

Contains GCC and MSVC info.
0 Comments
Posted on 13 Dec 2007 by gorlist

warning: no newline at end of file
Have you ever pondered why gcc complains when you compile a .c file that doesn't end with a newline?

My research led me to the C standard.

Excerpt from "5.1.1.2 Translation phases":

"2. Each instance of a backslash character () immediately followed by a new-line
character is deleted, splicing physical source lines to form logical source lines.
Only the last backslash on any physical source line shall be eligible for being part of such a splice. A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character before any such
splicing takes place."

0 Comments
Posted on 13 Dec 2007 by gorlist

Bullpaper
Bullpaper is my latest program.

What does it do?
Well, it generates titles for bullpapers.

What are bullpapers?
Those of you involved in academia, should be aware of the many papers getting published mostly by college professors.
Most of the times, the paper titles contain exotic, excessively complex words just to make them look like they're important, extremely specialized etc.
The less the reader understands, the better.
That seems to be the rule for the paper titles.

What about the content?
I'll leave that to you.

I don't need to explain where the "bull" part comes from, do I?

So, bullpaper is a Perl script and a wordlist.
You can add your own words to the wordlist.

bullpaper can be found under the projects section.

It is comprised of 3 templates and 3 bull-levels for specialized bull-results.

bullpaper.pl -h to see usage info.

Update:
I moved it to projects (was in code).

Also, someone asked me where I found the words.
I collected those from real papers (seriously!).

Note: Only new code will get announced.
0 Comments
Posted on 07 Dec 2007 by gorlist

<< Previous 1 2 3 4 5 6 7 8 9 Next >>

Copyright © gorlist 2007-2010