[Bug c++/93739] Ability to print a type name without aborting compilation

2020-02-14 Thread eyalroz at technion dot ac.il
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93739 --- Comment #4 from Eyal Rozenberg --- (In reply to Eyal Rozenberg from comment #3) A couple more points: * The error I get (https://godbolt.org/z/5GpR2T) doesn't have the "your type here" string. * This forces you to define a variable you're no

[Bug c++/93739] Ability to print a type name without aborting compilation

2020-02-14 Thread eyalroz at technion dot ac.il
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93739 --- Comment #3 from Eyal Rozenberg --- (In reply to Jonathan Wakely from comment #2) > Oops, that was meant to be print_type() Ok, that's a better kludge than mine - it doesn't have the more serious shortcomings. That makes the motivation for th

[Bug c++/93739] Ability to print a type name without aborting compilation

2020-02-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93739 --- Comment #2 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #1) > template > [[gnu::warning("your type here")]] > bool print_type() { return true; } > > int i; > bool b = print_type(); Oops, that was meant to be print_type

[Bug c++/93739] Ability to print a type name without aborting compilation

2020-02-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93739 --- Comment #1 from Jonathan Wakely --- template [[gnu::warning("your type here")]] bool print_type() { return true; } int i; bool b = print_type();