Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

117
Views
Destringification in the gcc preprocessor

Is it possibly to write a gcc macro that destringifies a string literal argument? I know the opposite is possible with #. Can it be reversed?

For example, __func__ evaluates to the name of the current function in the form of a string literal. Can I remove the double quotation marks around it?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

No, it is not possible to convert "foo" to foo using the standard C/C++ preprocessor. If you absolutely need this, you would need to create an external preprocessing program, similar to what Qt does with its moc tool.

Not completely on-topic, but the D language has exactly this functionality - it's called mixins. You can execute arbitrary string processing code at compile time and "paste" the result into your source file with the mixin keyword.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!