Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Found something cool in C11

Name: Anonymous 2014-08-06 10:58

c.h
typedef int i;
extern int shi;


c.c
#include "c.h"
#include "c.h"
#include "c.h"

int shi;

int
main (void)
{
return 0;
}


As you can see C11 allows multiple typedefs of the same type to the same type, a typedef long i; would be illegal
This avoids the need for include guards but sadly it does not work for structs, not that this is a problem

Name: Anonymous 2017-01-06 17:05

>>27
#pragma once is non-standard.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List