Category Archives: Compiler

strcpy traps me

Be aware of strcpy function has requirement for different char *, which is strcpy(char *, const char *). If you do something like strcpy(p,p+1) is dangerous, why not just use p++. Otherwise, some of compiler will have the issue shown at this link https://community.oracle.com/thread/2330498?start=0&tstart=0 .

see from outside of compiler

Compiler is always fun when it accompanies with computer architecture. The research on programming system (& language) is what I want to do besides CAD/EDA and mathematics. Not sure it is related to my A+ score in programming language course in graduate school (sorry for the self-obsession :b).

The course I find more focus on implementation is CMU version taught by Prof. Todd C. Mowry

at computer science dept. The course repo is at http://www.cs.cmu.edu/afs/cs.cmu.edu/academic/class/15745-s14/www/handouts.html

The LLVM  is used in the course, which is very handy and important to play around with compiler.

The last page of

http://www.cs.cmu.edu/afs/cs.cmu.edu/academic/class/15745-s14/public/lectures/L6-LLVM-Part2-1up.pdf

shows the references such as writing pass.

For research related stuff, check this http://www.cs.cmu.edu/afs/cs.cmu.edu/academic/class/15745-s14/www/discussion_info/table_of_contents.pdf