Bug 18159 - tr1/tuple is broken on darwin
Summary: tr1/tuple is broken on darwin
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-26 12:01 UTC by Andrew Pinski
Modified: 2004-11-01 19:41 UTC (History)
2 users (show)

See Also:
Host:
Target: powerpc-darwin
Build:
Known to work:
Known to fail:
Last reconfirmed: 2004-10-26 15:52:45


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2004-10-26 12:01:51 UTC
tr1/tuple is broken on darwin because tr1/tuple uses _T as a template argument and one of darwin's 
headers define it to be something.

_T goes against libstdc++'s coding style also.
Comment 1 Andrew Pinski 2004-10-26 12:02:40 UTC
This is why almost all of the tr1/tuple tests fail on darwin.
Comment 2 Chris Jefferson 2004-10-26 15:30:31 UTC
Yes, sorry, I was not aware of this convention.

I'm currently performing some general clean-up to the autogeneration of the
tuple header and will at the same time fix this. It's been suggested that _T
should be replaced with _Tp. I'm assuming this will be fine?

Chris
Comment 3 Andrew Pinski 2004-10-26 15:52:43 UTC
Yes _Tp is fine.
Comment 4 GCC Commits 2004-10-28 21:19:00 UTC
Subject: Bug 18159

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bkoz@gcc.gnu.org	2004-10-28 21:18:56

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/include/tr1: tuple 

Log message:
	2004-10-28  Chris Jefferson  <chris@bubblescope.net>
	
	PR libstdc++/18159
	* include/tr1/tuple: Fix, change formatting.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2733&r2=1.2734
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/tr1/tuple.diff?cvsroot=gcc&r1=1.1&r2=1.2

Comment 5 Andrew Pinski 2004-10-28 21:47:26 UTC
Fixed.
Comment 6 Andrew Pinski 2004-10-30 14:22:56 UTC
Not fully fixed, _I is the one which is invalid usage also.
The error I get:
/Users/pinskia/src/local/gcc/objdir/powerpc-apple-darwin7.4.1/libstdc++-v3/include/tr1/tuple:
1548: error: expected `>' before numeric constant

  template<int _I, class _Tp1, class _Tp2>
Comment 7 GCC Commits 2004-11-01 17:53:33 UTC
Subject: Bug 18159

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bkoz@gcc.gnu.org	2004-11-01 17:53:24

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/include/tr1: tuple 

Log message:
	2004-11-01  Chris Jefferson  <chris@bubblescope.net>
	
	PR libstdc++/18159
	* include/tr1/tuple (get(pair)): Change occurrences of _I to _Int.
	(get(const pair)): Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2741&r2=1.2742
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/tr1/tuple.diff?cvsroot=gcc&r1=1.2&r2=1.3

Comment 8 Andrew Pinski 2004-11-01 19:41:50 UTC
Fixed for sure this time, thanks.