Re: Lcc-Win32 bug?



I tested again the variable arguments feature.
Now, this program passes:
#include <stdio.h>
#include <stdlib.h>
char *toptfn1(void)
{
        return "hello world";
}

char *toptfn2(void)
{
        return "hello world 2\n";
}

int (*pfn)(int,char *=toptfn1());

int     Foo (int a,char* A=toptfn2());

int main(int argc, char *argv[])
{
  pfn = Foo;
  pfn(77);
  Foo(77);
  return 0;
}


int Foo (int n,char * A) {

  printf("%s\n",A);
  return 0;
}

Output:
hello world
hello world 2


This will be in the next release .



Relevant Pages

  • Re: Illegal internal write?
    ... I think it is -- both in the feature itself, ... char*), would require the prototype. ... representation; in C89/90 this is nonnormatively 'intended' to allow ... OTOH, FILE in practice almost always is a struct, although not ...
    (comp.lang.fortran)
  • Re: Fortran Features
    ... On the assumption that no feature should ... language and find it not nearly as useful as I expected. ... I don't find text labels all that useful where we already have them. ... You mean like overloading CHAR so that it takes ...
    (comp.lang.fortran)
  • Char Char Char Styles in Word 2002
    ... I read Susan Barnhill's response to a user with the "char char ... I understand this char style problem is ... "corrupt" in order to get rid of the styles is totally unacceptable. ... is a feature Microsoft has put into their program, they need to come up with ...
    (microsoft.public.word.pagelayout)
  • Re: [Emergency!] How to set system default language by code?
    ... char szCodePage; ... szLang, sizeof)> 0) ... Ferdinand. ... > A new feature is required to add to my program today. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: [Emergency!] How to set system default language by code?
    ... char szCodePage; ... szLang, sizeof)> 0) ... Ferdinand. ... > A new feature is required to add to my program today. ...
    (microsoft.public.vc.mfc)