Remove C-style comments in frontend and prefer C++-style
What is the difference?
C uses /* ... */ and C++ uses // ....... But maybe that's not the question?
C uses
/* ... */and C++ uses// ....... But maybe that's not the question?
Yes, thanks, that was the question. But this is the first time I hear of such distinction.
Yeah, sorry about that. I made these issues when reading the reviews on the patches and should have explained some of them a little better :)
For removing the c-style comments in frontend and prefer c++ style we can switch to " // "
Yep exactly @anuragcs :) are you interested in working on this?
@CohenArthur .. Yes I would love to contribute my share and work on following issue
@anuragcs thanks! I've assigned you to the issue
@CohenArthur I wish to learn about the expected file range of this issue, because I searched current code base with /* and got a result of 20015 hits in 1688 files among *.c, *.cc, *.h.
Only gcc/rust/, libgrust/, plus a few GCC/Rust-specific files elsewhere.
But I'm not convinced that such a mass-change is really a good use of everyone's time: to prepare the changes, and also the conflicts that arise when cherry-picking patches, including preparation of patches for upstream submission, etc.? I mean, there's no actual problem with /* [...] */-style comments?
Only
gcc/rust/,libgrust/, plus a few GCC/Rust-specific files elsewhere.But I'm not convinced that such a mass-change is really a good use of everyone's time: to prepare the changes, and also the conflicts that arise when cherry-picking patches, including preparation of patches for upstream submission, etc.? I mean, there's no actual problem with
/* [...] */-style comments?
I concur with @tschwinge that this commit is too large and can create significant difficulties in the review phase. We should handle this issue cautiously, perhaps by dividing the tasks into smaller parts. But still, we need a strong reason to do that @CohenArthur.
Here is an example of gcc/rust/ search result: https://github.com/search?q=repo%3ARust-GCC%2Fgccrs+%22%2F*%22+%28path%3A*.c+OR+path%3A*.cc+OR+path%3A*.h%29+path%3A%2F%5Egcc%5C%2Frust%5C%2F%2F+&type=code
There are 122 files in the result with more than 2K /*.
I saw some difficult comment pattern what would not be easy to convert:
https://github.com/Rust-GCC/gccrs/blob/b028c7ece2ad67236e55a38b776c0bf70408a53e/gcc/rust/lex/rust-token.h#L159-L162
Considering we haven't had any work done on this, and the fact that I agree with @tschwinge regarding the impact of this issue on everyone's time, I'll close it for now. I think we have more important things to focus on, and the rest of GCC is full of C-style comments anyway