作成者にもかかわらず、いきなり遅刻しました。ごめんなさい。Rust Advent Calendar 2013、今からでも参加できますのでぜひ。
今日はRustの特徴を簡潔に紹介します。
\documentclass[unicode]{beamer} | |
\usepackage[no-math,ipaex]{luatexja-preset} | |
\renewcommand{\kanjifamilydefault}{\gtdefault} | |
\usefonttheme{professionalfonts} | |
\usepackage{unicode-math} | |
\setmathfont{xits-math.otf} | |
\begin{document} |
src/api/fcntl.c: In function 'f': | |
src/api/fcntl.c:30:3: error: 'O_TTY_INIT' undeclared (first use in this function) | |
C(O_TTY_INIT) | |
^ | |
src/api/fcntl.c:5:21: note: in definition of macro 'C' | |
#define C(n) switch(n){case n:;} | |
^ | |
src/api/fcntl.c:30:3: note: each undeclared identifier is reported only once for each function it appears in | |
C(O_TTY_INIT) | |
^ |
作成者にもかかわらず、いきなり遅刻しました。ごめんなさい。Rust Advent Calendar 2013、今からでも参加できますのでぜひ。
今日はRustの特徴を簡潔に紹介します。
echo | gcc -E -xc -dM - | sort | uniq |
$ gcc --version | head -n1 | |
gcc (Gentoo 4.9.3 p1.2, pie-0.6.3) 4.9.3 | |
$ gcc -dumpmachine | |
x86_64-pc-linux-gnu | |
$ clang --version | head -n1 | |
clang version 3.7.1 (tags/RELEASE_371/final) | |
$ clang -dumpmachine | |
x86_64-pc-linux-gnu | |
$ cat > test.c | |
#include <stdio.h> |
$ gcc --version | head -n1 | |
gcc (Gentoo Hardened 4.9.3-r99 p1.2, pie-0.6.3) 4.9.3 | |
$ gcc -dumpmachine | |
x86_64-gentoo-linux-musl | |
$ cat hello.c | |
#include <stdio.h> | |
int main(void) | |
{ | |
puts("hello, world"); | |
return 0; |
// To compile: | |
// $ rustc --target <target environment> --lib -c -o main.o main.rs | |
#[no_std]; | |
#[no_mangle] | |
pub fn main() { | |
} |
cd src; \ | |
yacc -d parse.y; \ | |
flex scan.l | |
gcc -Wall -pedantic -DDEBUG=0 -O3 -shared -fPIC src/*.c -o lib/libpicrin.so -I./include -I./extlib -lm | |
src/codegen.c: 関数 ‘print_irep’ 内: | |
src/codegen.c:1055:3: 警告: 書式 ‘%p’ は引数の型が ‘void *’ であると予期されますが、第 2 引数の型は ‘struct pic_irep *’ です [-Wformat] | |
src/codegen.c:1056:3: 警告: ISO C90 は ‘z’ gnu_printf 長さ修飾子をサポートしません [-Wformat] | |
src/codegen.c:1056:3: 警告: ISO C90 は ‘z’ gnu_printf 長さ修飾子をサポートしません [-Wformat] | |
In file included from src/file.c:4:0: | |
./include/picrin/port.h:15:17: 警告: 列挙型リストの最後にコンマがあります [-pedantic] |
こちらも参考になります: https://gist.github.com/athos/8081180
これらの文章でGrenchmanというツールを知りました。ありがとうございます。