Bug 43780 - PATCH: long long functions in stdlib.h should be wrappered with __STRICT_ANSI__
Summary: PATCH: long long functions in stdlib.h should be wrappered with __STRICT_ANSI__
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: standards (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-standards (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-07 20:10 UTC by Peter Johnson
Modified: 2002-12-13 01:50 UTC (History)
0 users

See Also:


Attachments
file.diff (573 bytes, patch)
2002-10-07 20:10 UTC, Peter Johnson
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Johnson 2002-10-07 20:10:02 UTC
Compiling code that includes stdlib.h with the GCC options -ansi -pedantic
reports the following warnings on two lines of stdlib.h:
/usr/include/stdlib.h:110: warning: ANSI C does not support `long long'
/usr/include/stdlib.h:114: warning: ANSI C does not support `long long'
These lines are the strtoll and strtoull functions.

Fix: Add #ifndef __STRICT_ANSI__ wrappers around the offending lines:
How-To-Repeat: Compile a short program with gcc -ansi -pedantic that includes stdlib.h:
#include <stdlib.h>

int main()
{
return 0;
}
Comment 1 Tim Robbins freebsd_committer freebsd_triage 2002-10-08 03:36:07 UTC
On Mon, Oct 07, 2002 at 12:03:32PM -0700, Peter Johnson wrote:

> >Description:
> Compiling code that includes stdlib.h with the GCC options -ansi -pedantic
> reports the following warnings on two lines of stdlib.h:
> /usr/include/stdlib.h:110: warning: ANSI C does not support `long long'
> /usr/include/stdlib.h:114: warning: ANSI C does not support `long long'
> These lines are the strtoll and strtoull functions.

This is fixed in -CURRENT. I'll try to get the change MFC'd for 4.8 (it's too
late to do it for 4.7).


Tim
Comment 2 cedric.ware 2002-12-12 23:44:48 UTC
	Hello,

> > Compiling code that includes stdlib.h with the GCC options -ansi -pedantic
> > reports the following warnings on two lines of stdlib.h:
> > /usr/include/stdlib.h:110: warning: ANSI C does not support `long long'
> > /usr/include/stdlib.h:114: warning: ANSI C does not support `long long'
> > These lines are the strtoll and strtoull functions.
> 
> This is fixed in -CURRENT. I'll try to get the change MFC'd for 4.8 (it's too
> late to do it for 4.7).

If I may butt in, wouldn't the timing be just about right?

						Thank you,
						Cedric Ware.
Comment 3 Tim Robbins freebsd_committer freebsd_triage 2002-12-13 01:42:05 UTC
On Thu, Dec 12, 2002 at 03:50:02PM -0800, Cedric Ware wrote:

>  If I may butt in, wouldn't the timing be just about right?

Thanks for the reminder. I've just committed a patch that should fix
this problem.


Tim
Comment 4 Tim Robbins freebsd_committer freebsd_triage 2002-12-13 01:42:17 UTC
State Changed
From-To: open->closed

Fixed in revision 1.16.2.5 of stdlib.h. Thanks for pointing this out.