1

I remember seeing this style at one point (where a list of parameter names is followed by a secondary list having the actual types), but can't remember what it's called or when it's supposed to be valid (I'm building in Windows, at the moment):

uLong ZEXPORT adler32_combine(adler1, adler2, len2)
    uLong adler1;
    uLong adler2;
    z_off_t len2;
{
    return adler32_combine_(adler1, adler2, len2);
}

Can someone remind me?

Thanks, in advance.

Dustin Oprea
  • 9,673
  • 13
  • 65
  • 105
  • 2
    It's the old K&R C syntax (pre C89) - lots of dupes on SO for this – Paul R Aug 19 '13 at 21:29
  • did you tried on your compiler and gcc, try on ideone or codepad. -- yes that doesn't defined language standards... – Grijesh Chauhan Aug 19 '13 at 21:30
  • @GrijeshChauhan I don't what you're asking. It fails on my current VS9 compiler. – Dustin Oprea Aug 19 '13 at 21:31
  • @DustinOprea Oh ok so you did try. I was asking this only. I question duplicates read there a good link. – Grijesh Chauhan Aug 19 '13 at 21:34
  • 3
    @PaulR Thanks, Paul. I found it too obscure to find useful search results (without even knowing that it was obsolete K&R). – Dustin Oprea Aug 19 '13 at 21:35
  • @Dustin: yes, it's hard to Google for the name of something when you don't know what it's called. ;-) – Paul R Aug 19 '13 at 21:35
  • @PaulR Yeah. Try searching "c signature invalid", or the like :) . Do you know what flag to set in VS 2010 to allow these to compile? Some imported projects don't have a problem with it. – Dustin Oprea Aug 19 '13 at 21:41
  • Sorry - the C compiler in Visual Studio is pretty bad and I avoid using it as far as possible - it still doesn't support C99 (14 years behind the times) and from what you say it sounds like it doesn't support pre-C89 syntax either. – Paul R Aug 19 '13 at 21:43
  • I take that last part back - it seems you might just need to make sure it's a .c file and not a .cpp (or .C) file - see http://stackoverflow.com/questions/8949382/is-it-possible-to-compile-pre-ansi-kr-style-c-code-with-visual-c – Paul R Aug 19 '13 at 21:45
  • @PaulR Technically, I'm running with the VS 2008 toolchain inside of 2010, so it's only nine years behind. I am using C files. It looks like it's tripping over a duplicate-definition with that symbol name, which is then, apparently, making it go crazy when it hits the K&R syntax. This is going to be fun... – Dustin Oprea Aug 19 '13 at 21:55

0 Answers0