Compiling in ANSI compliance mode failure

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiling in ANSI compliance mode failure

Thomas Steinbach
Hello NG,

I think I found a bug in the include files stdlib.h
and malloc.h of the runtime versions 3.15 and 3.15.1
(and malloc.h from version 3.14)

following example program will not compile when
I try to compile with ansi compliance and all warnings on

using the following command
gcc -Wall -pedantic -ansi test.c -o test.exe

---snip--- test.c
#include <stdio.h>
/*#include <stdlib.h>*/
/*#include <malloc.h>*/

int main(int argc, char * argv[])
{
 printf( "test" );
 return 0;
}
---snap---

try to compile as given. All seems to be ok.
But if you comment out stdlib.h or malloc.h
you got that error (current mingw and rt 3.15.1)
and no output file is given.

---snip---
In file included from test.c:7:
C:/opt/mingw3/bin/../lib/gcc/mingw32/3.4.5/../../../../include/stdlib.h:317:
   error: syntax error before "double"
---snap---

I can fix this by replacing the stdlib.h
with that file from version 3.14 but, that
isn't the way I would prefer ;-)

if I try to include malloc.h I got an
identical error, but can't fix by replacing
with old runtime header files

btw: Why there are no older versions of mingw
available at sourceforge.net? I think it would be good
if there will be available in the future...

Thomas



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Compiling in ANSI compliance mode failure

Earnie Boyd

Quoting Thomas Steinbach <[hidden email]>:

> Hello NG,
>
> I think I found a bug in the include files stdlib.h
> and malloc.h of the runtime versions 3.15 and 3.15.1
> (and malloc.h from version 3.14)
>

http://www.mingw.org/Reporting_Bugs

> btw: Why there are no older versions of mingw
> available at sourceforge.net? I think it would be good
> if there will be available in the future...
>

Why should that be of value?  You have shown an error that was
introduced from one version to another.  If you're really interested in
previous versions you'll look at the CVS history to determine when the
change was made.

http://www.mingw.org/wiki/Official_CVS_Repository

Earnie

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Compiling in ANSI compliance mode failure

Keith Marshall
On Tuesday 28 October 2008 11:14:56 Earnie Boyd wrote:
> > I think I found a bug in the include files stdlib.h
> > and malloc.h of the runtime versions 3.15 and 3.15.1
> > (and malloc.h from version 3.14)
>
> http://www.mingw.org/Reporting_Bugs

Already reported...
http://article.gmane.org/gmane.comp.gnu.mingw.user/27765
http://article.gmane.org/gmane.comp.gnu.mingw.user/27795

Already fixed...
http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/mingw/ChangeLog?rev=1.417&content-type=text/x-cvsweb-markup&cvsroot=src
2008-10-11  Keith Marshall  <[hidden email]>

        Make strtod() inline definition C89 compliant.
        (Issue reported by Ilya Shestopalov and Ian Puleston)
        (Correction identified by Danny Smith)

        * include/stdlib.h (strtod): Declare as `__inline__', not
        `inline'; reformat inline function definition.

> > btw: Why there are no older versions of mingw
> > available at sourceforge.net? I think it would be good
> > if there will be available in the future...
>
> Why should that be of value?

Can't imagine, but they *are* there anyway, if you take the trouble to
look -- hint: what do you think `Previous' might mean?

Regards,
Keith.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Compiling in ANSI compliance mode failure

Thomas Steinbach
In reply to this post by Earnie Boyd
Hello Earnie,

>> I think I found a bug in the include files stdlib.h
>> and malloc.h of the runtime versions 3.15 and 3.15.1
>> (and malloc.h from version 3.14)

> Why should that be of value?  You have shown an error that was

Why not?
Perhaps there are other users who are wondering about
that behavior and this message will be helpful to them.

> introduced from one version to another.  If you're really interested in
> previous versions you'll look at the CVS history to determine when the
> change was made.

I'm not a professional. Just a simple user
and does not know how to use a cvs repository and
how to "extract" older versions

Thomas


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Compiling in ANSI compliance mode failure

Thomas Steinbach
In reply to this post by Keith Marshall
Hello Keith,

>>> I think I found a bug in the include files stdlib.h
>>> and malloc.h of the runtime versions 3.15 and 3.15.1
>>> (and malloc.h from version 3.14)

> Already reported...
> http://article.gmane.org/gmane.comp.gnu.mingw.user/27765
> http://article.gmane.org/gmane.comp.gnu.mingw.user/27795
>
> Already fixed...
> http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/mingw/ChangeLog?rev=1.417&content-type=text/x-cvsweb-markup&cvsroot=src

Thank you for that links but I'm a little bit
helpless what I have to do and how to fix this error
or to get rt 3.15.1 running

>        Make strtod() inline definition C89 compliant.
>        (Issue reported by Ilya Shestopalov and Ian Puleston)
>        (Correction identified by Danny Smith)
>
>        * include/stdlib.h (strtod): Declare as `__inline__', not
>        `inline'; reformat inline function definition.

[etc.]

Puuh, strange for me and very confusing to me.
Do I have to aply all these definitions/hints to compile in
ANSI compilance mode?

>>> btw: Why there are no older versions of mingw
>>> available at sourceforge.net? I think it would be good
>>> if there will be available in the future...
>>
>> Why should that be of value?
>
> Can't imagine, but they *are* there anyway, if you take the trouble to
> look -- hint: what do you think `Previous' might mean?

I think I know the meaning of previous, but didn't find
a previous versions - just the version 3.15.1.

But I would like to get 3.15.1 running. Not the old ones.

Anyway. Perhaps somebody would like to test other older
versions and if theese older versions are available,
perhaps it will be usefull for those people... it's just
an idea...

Thomas


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Compiling in ANSI compliance mode failure

Greg Chicares
On 2008-10-30 16:06Z, Thomas Steinbach wrote:

>
>>        Make strtod() inline definition C89 compliant.
>>        (Issue reported by Ilya Shestopalov and Ian Puleston)
>>        (Correction identified by Danny Smith)
>>
>>        * include/stdlib.h (strtod): Declare as `__inline__', not
>>        `inline'; reformat inline function definition.
>
> [etc.]
>
> Puuh, strange for me and very confusing to me.

It's a standard 'ChangeLog' entry:

http://www.gnu.org/prep/standards/html_node/Change-Logs.html

> Do I have to aply all these definitions/hints to compile in
> ANSI compilance mode?

Keith already applied the changes described in the log.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Compiling in ANSI compliance mode failure

Keith Marshall
In reply to this post by Thomas Steinbach
On Thursday 30 October 2008 16:06:32 Thomas Steinbach wrote:

> >>> I think I found a bug in the include files stdlib.h
> >>> and malloc.h of the runtime versions 3.15 and 3.15.1
> >>> (and malloc.h from version 3.14)
> >
> > Already reported...
> > http://article.gmane.org/gmane.comp.gnu.mingw.user/27765
> > http://article.gmane.org/gmane.comp.gnu.mingw.user/27795
> >
> > Already fixed...
> > http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/mingw/ChangeLog?r
> >ev=1.417&content-type=text/x-cvsweb-markup&cvsroot=src
>
> Thank you for that links but I'm a little bit
> helpless what I have to do and how to fix this error
> or to get rt 3.15.1 running

You may edit your own locally installed copy of stdlib.h, as Danny
describes in the follow up to that first article, or download my
updated copy directly from the CVS:
http://cygwin.com/cgi-bin/cvsweb.cgi/~checkout~/src/winsup/mingw/include/stdlib.h?rev=1.37&content-type=text/plain&cvsroot=src

Regards,
Keith.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users