This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Use of templates in c code?
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Alec Teal <a dot teal at warwick dot ac dot uk>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 13 Feb 2013 13:39:31 +0100
- Subject: Re: Use of templates in c code?
- References: <ephoi8m2t38ix2sgwn4gt7qq.1360758661224@email.android.com>
On Wed, Feb 13, 2013 at 1:31 PM, Alec Teal <a.teal@warwick.ac.uk> wrote:
> I've been studying/reading gccs code, watching it compile though a debugger and reading. Today I noticed something odd in the c++ parser's file. I saw what appeared to be a template in a .c file.
It's just a filename ... we compile it with a C++ compiler.
Richard.
> I am on a different computer now but it was vec< and occurred about 1/6th of the way in, it should be easy to find.
>
> Is that allowed? Is my main question. I would support a c with templates it'd save macro usage, that could only be good! Or is there some construct of c I do not know of.
>
> Searching for c templates proved fruitless I got loads of c++ results
>
> Alec