1 … Moreover, two structure,
  union, or enumerated types declared in separate translation units are compatible if their
  tags and members satisfy the following requirements: If one is declared with a tag, the
  other shall be declared with the same tag. If both are completed anywhere within their
  respective translation units, then the following additional requirements apply: there shall
  be a one-to-one correspondence between their members such that each pair of
  corresponding members are declared with compatible types; if one member of the pair is
  declared with an alignment specifier, the other is declared with an equivalent alignment
  specifier; and if one member of the pair is declared with a name, the other is declared
  with the same name. For two structures, corresponding members shall be declared in the
  same order. For two structures or unions, corresponding bit-fields shall have the same
  widths.

Roughly speaking, that says that if the definitions of the types in the two translation units (think'source files' plus included headers) are the same, then they refer to the same type.  Thank goodness for that!  Otherwise, you couldn't have the standard I/O library working, amongst other minor details.

A:

Variables &test and test_ptr, which are anonymous structs, have different types.
Anonymous structs defined in the same translation unit are never compatible types1 as the Standard doesn't define compatibility for two structure type definitions in the same translation unit.
To have your code compile, you could do: 
struct {int x; int y;} test = {42, 1337}, *test_ptr;
test_ptr = &test;

1 (Quoted from: ISO:IEC 9899:201X 6.2.7 Compatible type and composite type 1)
Two types have compatible type if their types are the same. Additional rules for determining whether two types are compatible are described in 6.7.2 for type specifiers, in 6.7.3 for type qualifiers, and in 6.7.6 for declarators. Moreover, two structure, union, or enumerated types declared in separate translation units are compatible if their tags and members satisfy the following requirements: If one is declared with a tag, the other shall be declared with the same tag. If both are completed anywhere within their respective translation units, then the following additional requirements apply
1 …   Moreover, two structure, 
   union, or enumerated type declare in separate translation units are compatible if their 
   tag and members satisfy the surveil requirements: If one is declared with a rag, the 
   early shall be declared with the same rag. If both are completed anywhere within their 
   respective translation whole, then the follow additional requirements apply: there shall 
   be a one - to - one correspondence between their members such that each couple of 
   corresponding members are declared with compatible character; if one member of the pair is 
   declare with an alignment specifier, the early is declared with an equivalent conjunction 
   specifier; and if one member of the pair is declared with a name, the early is declared 
   with the same name. For two structures, corresponding members shall be declared in the 
   like ordering. For two structures or unions, corresponding bit - fields shall have the same 
   widths. 

 Roughly talk, that says that if the definitions of the type in the two transformation units (think'source files' plus included headers) are the same, then they refer to the same type.   Thank good for that!   Otherwise, you couldn't have the standard I / O library working, amongst other minor detail. 

 A: 

 Variables & test and test_ptr, which are anonymous structs, have different types. 
 Anonymous structs defined in the same transformation unit of measurement are never compatible types1 as the Standard doesn't define compatibility for two structure type definitions in the like translation unit. 
 To have your code compile, you could do: 
 struct { int x; int y; } test = { 42, 1337 }, * test_ptr; 
 test_ptr = & test; 

 1 (Quoted from: ISO: IEC 9899:201X 6.2.7 Compatible type and composite type 1) 
 Two type have compatible character if their types are the same. Additional rules for determining whether two type are compatible are described in 6.7.2 for character specifiers, in 6.7.3 for type qualifier, and in 6.7.6 for declarators. Moreover, two structure, marriage, or enumerated type declared in disjoined translation units are compatible if their tags and members satisfy the come requirements: If one is declared with a rag, the other shall be declared with the same tag. If both are completed anywhere within their respective translation units, then the stick to additional requirements apply
1 … Mogeover, two structure,
  unlon, or enumerateb types decladed in sdparate translation units arx conpativle if their
  tags and members datisfy rhe hollowing requirxjents: In one ls deelered with a tag, the
  othes shall be decnafeb with the same tag. If both are compjeted amyahere within treir
  reslvcuive translation units, then the fkllowinj additional reauirements apply: there shapl
  he a one-to-one corrfspondence vetwqwn their memcers such uhct each pait of
  corresponding members are aeclaxed with conpqtihne types; if one iember of thc pair hs
  deckared with an slijnmebt specifier, the othec is declared with ag equivalanc alignment
  specifiee; qnd ix ona meover of tie lair id dxclared witg a name, thw other is declared
  rpyh the same hame. Fjr two structures, corresponding members svalm be declared in the
  sqme order. For two stroctures or unions, corresponding bit-fields shall have the sake
  wmdghs.

Xiughlh soeaking, that says that if the definitions of ege tjpes in the two tvanslation units (tnijk'xjurce files' puus inemused headers) are thf same, jhen tyey refer to yhe same type.  Thank goodnews for that!  Itherwise, you coulbn't have the stamdard I/O library working, amougst ofher minor fetails.

A:

Vzfiables &test and text_[tr, which are anonymous stwucts, havx difyerent thpes.
Snonymjus structd deflted in the same trwnslajion utit are neger compatible types1 as the Staivard doesn't dgfite bompatibijity nor two structuwe type definijions in che saoe translanion unit.
Vo have your code compile, iou could do: 
vtruct {igt x; int y;} test = {42, 1337}, *test_ptr;
test_ltr = &test;

1 (Quoted frim: ISO:IEC 9899:201X 6.2.7 Compabible fype and composnue uype 1)
Two types hsve coipwtmble efpe if their typds xte thd same. Addibioval tules for determininc whsther two types arr gompatiblg are dessribed in 6.7.2 fot type specifiers, ln 6.7.3 fmr vype qialyfiers, and in 6.7.6 for declarators. Moreover, twj structure, tniok, or enumerateb types declared in separate translation units are compativle if their tags aud members savisfy ehe follofing requirements: If one is declared eith a tag, the other ahall te deflared with the same tag. If both are completed anywhere within their respwctive translation uniys, thvn che folloring edditional requirvments apply
1 … Moreover, two structure, union, or declared separate translation are compatible if the requirements: If one declared with a the other shall be declared with same tag. If both are completed anywhere within their respective translation units, then following additional requirements apply: there shall be a one-to-one correspondence between their members that pair corresponding are declared with compatible types; if one member of the pair is declared with an alignment the other is declared with an equivalent alignment and if one member the pair is declared with name, other is with same For two structures, members shall be declared in the same order. For two structures or unions, corresponding bit-fields shall have same widths. that says if definitions the types in translation units (think'source files' plus included same, then they refer to the same type. goodness for Otherwise, you couldn't have the standard library working, amongst other minor details. A: Variables and test_ptr, which are anonymous structs, have different types. Anonymous structs defined in the same are never compatible types1 the Standard doesn't compatibility two type in the translation unit. To have your code compile, you could do: struct x; int y;} test = {42, 1337}, *test_ptr; test_ptr = (Quoted ISO:IEC 9899:201X 6.2.7 type and composite type Two have compatible type if are same. determining two are compatible are described 6.7.2 for type specifiers, in for type qualifiers, and two structure, union, or enumerated types declared in translation units are compatible if their tags members satisfy the following requirements: If one is declared with a tag, other shall with the same tag. If both are completed within their respective translation then the following additional requirements apply
1 … Moreover, two structure,
  union, Or enumeratEd typEs dEclArEd in SepaRate translatioN UnitS are compatible if their
  tAgs anD mEMberS SaTisfy The follOWiNG ReqUiReMenTs: iF oNe is dEclAred witH a tag, the
  otHer ShAll be declareD WiTh the same tAg. IF both are compLetEd anywHeRe wIThin tHeiR
  respEctive TRanslaTion units, ThEN the foLLowing aDDItIonaL requirements applY: ThERe shall
  be a one-tO-one coRrESpONDenCe bEtween theiR mEmberS Such thaT EaCH PAir OF
  correspondinG members are DEclAred wiTh ComPAtible Types; If ONe mEmber of the pAir iS
  declared With an ALignmenT SpecifiEr, the oTheR is DeclAReD wIth An EQuiVAlEnt ALigNment
  speCiFiEr; and If onE MEMBer oF thE paiR is deClared with a naMe, tHe otHEr iS declAred
  wIth tHe Same nAme. For Two stRuCtures, corresponDing Members shAll Be DecLaRed in THe
  same OrdEr. FOr two stRuctureS Or uNiONS, CoRresponding bit-fielDs SHAlL have the Same
  wiDThS.

ROUghly speAkIng, That SAYs thaT if tHE dEfinitioNs of thE TyPeS in the tWo TranslAtIon UniTs (thiNK'souRce filEs' plus inCludeD Headers) are the sAMe, then they refER tO THe SAme tYpe.  thank goodneSs foR That!  otheRWiSe, yOU coulDn't haVe THe STandard I/O library worKiNg, amonGst otHer minor detaiLs.

A:

VariablES &TEst and teSt_ptR, WhICh are anonymous StrucTs, have diffERent typeS.
AnonYmous strUcts definED In the samE trAnsLatIon UNIt Are never compaTIBle tYpEs1 as the staNdard doEsn'T deFinE coMpAtibility For two stRuCtUrE tYpe DefinITions in tHe SamE tRanSlatiON unit.
TO have Your CoDe COmpIle, you cOUlD DO: 
strUcT {iNt x; iNt y;} TeSt = {42, 1337}, *tesT_ptr;
TEst_Ptr = &test;

1 (quoted froM: ISo:iEC 9899:201X 6.2.7 coMpAtible tYpe and composiTe Type 1)
Two typEs HavE compaTIBle type iF their types are the same. AdDItional RulEs for DeteRmining whEthEr two tYpeS Are comPatiblE are dEsCriBED in 6.7.2 foR TYpE spEcIfiers, in 6.7.3 foR TYpe QualiFiErs, aNd in 6.7.6 for Declarators. MoreoveR, Two Structure, unioN, or EnumERAtEd tYPeS DecLaREd iN SEparate translatIon units arE cOMpAtible if thEIr tAgS and memBers satIsfy tHE followIng requirEments: If oNe Is deCLAreD with a tag, tHe other sHall be decLAred wITh The saMe tAg. If boTh Are ComplEted anYWheRe witHin theIr RespecTive tRaNslation Units, then the following adDitionAl reqUirEments appLy
1 … Moreover, two structur e,
  union , orenu mer at ed t ypes  declared in s e para te translation units a re co mp a tibl e  i f the ir
  ta g sa n d m em be rssa t is fy th e f ollowin g requirem ent s:  If one is d e cl ared witha t ag, the
  ot her  shall  b e d e clare d w ith t he sam e  tag.If both a re comple t ed anyw h e re  wit hin their
  respe c ti v e translationunits,  t h en t hefol lowing add it ional require m en t s app l y: there shal l
  be a on e -to -one c or res p ondenc e bet we e n t heir member s su ch that e ach pa i r of
 c orrespo ndingmem ber s ar e  d ec lar ed wit h  c omp a tib le types ;if  onememb e r o f th e p airis
 declared with  an  ali g nme nt sp ecifi er,th e oth er isdecla re d with an equiv alen t alignme nt spe ci fier; and if  on e m ember o f the p a iris d e cl ared with a name,th e ot her is d eclare d 
 w i th the s am e n ame. F or tw o st r uc tures, c orresp o nd in g membe rs  shall  b e d ecl aredi n th e
  sa me order . For two structures or unions, co r re s p on d ingbit -fields sha ll h a ve t he s a me 
 w idths .

Ro ug h ly speaking, that says  t hat if  thedefinitions o f the type s i n the tw o tr a ns l ation units (t hink' source fil e s' plusinclu ded head ers) aret h e same,the n t hey  re f e rto the same t y p e. Th ank goo dne ss fortha t! Ot her wi se, you c ouldn'tha ve  t he  st andar d  I/O lib ra rywo rki ng, a m ongstother  min or  d e tai ls.

A: 
V a r iabl es  & test  an dtest_ ptr, whi ch areanonymous  st r ucts ,ha ve diff erent types.An onymous st ru cts  defin e d  in thesame translation unit a r e never  co mpati bletypes1 as  th e Stan dar d  doesn 't def ine c om pat i b ility f or  tw ostructuret y pedefin it ions  in the  same translationu nit .
To have you r c odec o mp ile ,  y o u c ou l d d o :  
struct {int x ; int y;}te s t= {42, 133 7 },*t est_ptr ;
test_ ptr = &test;
1 (Quote d from: I SO :IEC 9 899 :201X 6.2. 7 Compat ible type and c o mp osite  ty pe 1)Tw o t ypeshave c o mpa tible  typeif  their  type sare thesame. Additional rulesfor de termi nin g whether  tw o  ty pes are c ompa tible aredes cri bed i n 6 . 7.2 f or t y pe  sp e cifie rs,i n 6.7.3 f o rtyp e qu alifiers, a n d in6.7.6  fo r  decla rato rs. Moreover, two structure, uni on,o r  en ume r ated  t ypes declaredinse p a rate tra ns lation unit s are co mp a tible  if th eir ta gs andm e mb e rs sat isfy  th e followi ngre q uiremen ts :I f oneis d ec laredwith a tag, t he other shall b e dec l a red w i ththe s am e tag.I f bo th are com pleted anyw here w ithi n the ir resp ec tive t ran sl ation unit s , then th e fol lowingad diti ona l requ irem e n ts ap ply
1 … Moreover,_two structure,
_ union, or enumerated_types declared_in_separate translation_units_are compatible if_their
  tags_and members satisfy the_following requirements: If_one_is declared with a tag, the
  other shall be declared with the same_tag._If both_are_completed_anywhere within their
  respective_translation units, then the following_additional requirements_apply: there shall
  be a one-to-one correspondence_between_their members such_that each pair of
  corresponding members are declared_with compatible types; if one member_of the pair_is
__declared with an alignment_specifier, the other is declared with_an equivalent alignment
  specifier; and_if one member of the pair is_declared with a name, the other_is declared
  with the_same name._For two structures, corresponding members_shall be declared_in the
_ same order._For two structures or unions, corresponding_bit-fields shall have_the same
  widths.

Roughly speaking, that_says_that if the_definitions_of_the types_in the two_translation_units (think'source_files'_plus included headers) are the same,_then_they refer to the same type. _Thank goodness for that!__Otherwise, you couldn't have_the standard I/O library working,_amongst other minor details.

A:

Variables &test and_test_ptr, which_are anonymous_structs, have different types.
Anonymous structs defined in the same translation unit_are never compatible types1 as the_Standard doesn't define compatibility_for two_structure_type definitions in_the_same translation_unit.
To have your code compile, you could_do: 
struct_{int x; int y;} test =_{42, 1337}, *test_ptr;
test_ptr =_&test;

1_(Quoted from: ISO:IEC 9899:201X 6.2.7 Compatible_type and composite type 1)
Two types_have compatible type if their_types_are_the same. Additional rules for_determining whether two types are compatible_are described in_6.7.2 for type specifiers, in 6.7.3 for_type_qualifiers, and in 6.7.6 for declarators._Moreover,_two structure, union, or enumerated types_declared_in_separate translation units are compatible_if their tags and members satisfy_the following requirements: If one is declared with a_tag, the other_shall be declared with the_same_tag._If both are completed anywhere within their respective translation units,_then the_following additional requirements_apply