zeux,
@zeux@mastodon.gamedev.place avatar

This indentation should be illegal.

forrestthewoods,
@forrestthewoods@mastodon.gamedev.place avatar

@zeux omg yes. It infuriations me that for some reason is put on column 0. Makes no bloody sense

TomF,
@TomF@mastodon.gamedev.place avatar

@forrestthewoods @zeux I assume it's because can blow through any sort of scope rules etc. Except that usually we don't write it so it does...

reedbeta,
@reedbeta@mastodon.gamedev.place avatar

@TomF @forrestthewoods @zeux iirc there used to be a rule that the # had to be on column 0 but the rest of the directive could be indented? So you could write stuff like

# if (FOO)  
# define BAR  
# endif  

No one enforces that anymore (you can indent the # now), but I wonder what was the origin of that rule

andrewwillmott,
@andrewwillmott@mastodon.gamedev.place avatar

@reedbeta @TomF @forrestthewoods @zeux some very early cpp's assumed that, but having blank characters before the # has been legal since C89. So you're on pretty safe ground :)

forrestthewoods,
@forrestthewoods@mastodon.gamedev.place avatar

@andrewwillmott @reedbeta @TomF @zeux C89? Better wait until 2029 just to be safe!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • thenastyranch
  • ngwrru68w68
  • magazineikmin
  • khanakhh
  • rosin
  • mdbf
  • Youngstown
  • slotface
  • everett
  • cisconetworking
  • kavyap
  • tacticalgear
  • InstantRegret
  • JUstTest
  • Durango
  • osvaldo12
  • ethstaker
  • modclub
  • GTA5RPClips
  • Leos
  • cubers
  • tester
  • normalnudes
  • megavids
  • provamag3
  • anitta
  • lostlight
  • All magazines