﻿id	summary	reporter	owner	description	type	status	priority	component	version	resolution	keywords	cc
172	Anonymous struct can conflict across translation unit	Thierry Delisle		"Given a header fred.hfa with the following code:
{{{
typedef struct { /*...*/ } my_struct_t;

void foo( my_struct_t * );
}}}

This will create a struct of name anonymous[N] where [N] is replaced by a simple counter.

Now if fred.cfa and mary.cfa include the file as follows: 
{{{
--- fred.cfa ---
#include ""fred.hfa""

/* ... use foo() ... */

--- mary.cfa ---
typedef struct { int i; } my_int_t;
#include ""fred.hfa""

/* ... use foo() ... */
}}}

In these 2 files, since the number of structs anonymous struct differs, foo will mangle differently.

This means that it may be impossible to link the 2 files together.

Note: linux makes heavy use of typedef struct which means this can break code easily"	defect	closed	major	cfa-cc	1.0	fixed	mangling, backwards-compatibility	
