TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Abusing the C Compiler

40 pointsby wingoover 14 years ago

3 comments

acqqover 14 years ago
Hardly abusing or original, generating small chunks of code and invoking C compiler on each of these is how GNU autoconf works (and the reason it works slow, too!)
评论 #1671520 未加载
nitfolover 14 years ago
<a href="http://perldoc.perl.org/pstruct.html" rel="nofollow">http://perldoc.perl.org/pstruct.html</a> takes this a bit further (but less portably), and compiles the code to assembly and parses out the debug records to find the information about the structures.
JoeAltmaierover 14 years ago
Very cute; very problematical. C struct offsets depend entirely on the model, packing, target etc. How can this be controlled?
评论 #1671846 未加载
评论 #1672830 未加载