Skip to content

Instantly share code, notes, and snippets.

@jdub

jdub/hello.c Secret

Created April 3, 2018 10:33
Show Gist options
  • Save jdub/58f9ebd7703358cf6f58ea39950dea68 to your computer and use it in GitHub Desktop.
Save jdub/58f9ebd7703358cf6f58ea39950dea68 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include "pants.h"
int
main() {
printf("Hello World\n");
pants();
}
extern {
fn pants();
}
fn main() {
println!("Hello World");
unsafe { pants(); }
}
#include <stdio.h>
#include "pants.h"
#include "shirt.h"
#include "socks.h"
inline void
pants() {
printf("Hello Pants\n");
shirt();
socks();
}
//__attribute__((always_inline))
void pants();
#include <stdio.h>
//__attribute__((always_inline))
static inline void shirt() {
printf("Hello Shirt\n");
}
#include <stdio.h>
#include "socks.h"
inline void
socks() {
printf("Hello Socks\n");
}
//__attribute__((always_inline))
void socks();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment