[hwloc-devel] Create success (hwloc r1.1a1r1988)
Creating nightly hwloc snapshot SVN tarball was a success. Snapshot: hwloc 1.1a1r1988 Start time: Wed Apr 21 21:01:02 EDT 2010 End time: Wed Apr 21 21:03:00 EDT 2010 Your friendly daemon, Cyrador
Re: [hwloc-devel] [hwloc-svn] svn:hwloc r1986
Jeff Squyres, le Wed 21 Apr 2010 09:04:11 -0400, a écrit : > On Apr 21, 2010, at 8:47 AM, Bert Wesarg wrote: > > > From that page: > > > > If you are writing a header file that must work when included in > > ISO C programs, write __typeof__ instead of typeof. See Alternate > > Keywords. > > > > > Modified: trunk/src/topology.c > > > > That does not look like a header for me. > > Right, but gcc complained when used with -std=c99 unless it was __typeof__. > I did not check to see if icc or pgcc accepted typeof. I read that text to > be "if you want portable code, use __typeof__ instead of typeof." Err, putting underscores doesn't magically makes something recognized by compilers :) The reason why the documentation tells about headers and not .c files is that while you control which standard your .c files are compiled under (e.g. -std=c99), you do not control which standard your .h files will be compiled under by other applications, that's why you need a way to tell a compiler "don't complain about these extensions I know you support but warn about because you were given -std=c99). Here, typeof is not c99, and that's why gcc complains when given -std=c99 (instead of the default -std=gnu99). Putting underscores just hides the bug... Samuel
Re: [hwloc-devel] [hwloc-svn] svn:hwloc r1988
Perfect; this is better than my solution. Thanks! On Apr 21, 2010, at 12:22 PM,wrote: > Author: sthibaul > Date: 2010-04-21 12:22:39 EDT (Wed, 21 Apr 2010) > New Revision: 1988 > URL: https://svn.open-mpi.org/trac/hwloc/changeset/1988 > > Log: > __typeof__ is not c99 > Text files modified: >trunk/src/topology.c | 8 >1 files changed, 4 insertions(+), 4 deletions(-) > > Modified: trunk/src/topology.c > == > --- trunk/src/topology.c(original) > +++ trunk/src/topology.c2010-04-21 12:22:39 EDT (Wed, 21 Apr 2010) > @@ -648,8 +648,8 @@ > * complete. > */ > > -#define merge_index(new, old, field) \ > - if ((old)->field == (__typeof__((old)->field)) -1) \ > +#define merge_index(new, old, field, type) \ > + if ((old)->field == (type) -1) \ > (old)->field = (new)->field; > #define merge_sizes(new, old, field) \ >if (!(old)->field) \ > @@ -680,12 +680,12 @@ >for (child = cur->first_child; child; child = child->next_sibling) { > switch (hwloc_obj_cmp(obj, child)) { >case HWLOC_OBJ_EQUAL: > -merge_index(obj, child, os_level); > +merge_index(obj, child, os_level, signed); > if (obj->os_level != child->os_level) { >fprintf(stderr, "Different OS level\n"); >return; > } > -merge_index(obj, child, os_index); > +merge_index(obj, child, os_index, unsigned); > if (obj->os_index != child->os_index) { >fprintf(stderr, "Different OS indexes\n"); >return; > ___ > hwloc-svn mailing list > hwloc-...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-svn > -- Jeff Squyres jsquy...@cisco.com For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
Re: [hwloc-devel] [hwloc-svn] svn:hwloc r1986
On Apr 21, 2010, at 8:47 AM, Bert Wesarg wrote: > From that page: > > If you are writing a header file that must work when included in > ISO C programs, write __typeof__ instead of typeof. See Alternate > Keywords. > > > Modified: trunk/src/topology.c > > That does not look like a header for me. Right, but gcc complained when used with -std=c99 unless it was __typeof__. I did not check to see if icc or pgcc accepted typeof. I read that text to be "if you want portable code, use __typeof__ instead of typeof." -- Jeff Squyres jsquy...@cisco.com For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
Re: [hwloc-devel] [hwloc-svn] svn:hwloc r1986
On Wed, Apr 21, 2010 at 14:27,wrote: > Author: jsquyres > Date: 2010-04-21 08:27:33 EDT (Wed, 21 Apr 2010) > New Revision: 1986 > URL: https://svn.open-mpi.org/trac/hwloc/changeset/1986 > > Log: > Refs #18. Fix some compiler warnings: > > * Note the change of typeof to !__typeof__ -- I got that from > http://gcc.gnu.org/onlinedocs/gcc/Typeof.html. >From that page: If you are writing a header file that must work when included in ISO C programs, write __typeof__ instead of typeof. See Alternate Keywords. > Modified: trunk/src/topology.c > == > --- trunk/src/topology.c (original) > +++ trunk/src/topology.c 2010-04-21 08:27:33 EDT (Wed, 21 Apr 2010) > @@ -649,7 +649,7 @@ > */ > > #define merge_index(new, old, field) \ > - if ((old)->field == (typeof((old)->field)) -1) \ > + if ((old)->field == (__typeof__((old)->field)) -1) \ That does not look like a header for me. Bert
Re: [hwloc-devel] Please review r1986
Jeff Squyres wrote: > I fixed some compiler warnings in r1986 -- I have mixed feelings about > renaming local variables named "index" and "y1". :-\ > > https://svn.open-mpi.org/trac/hwloc/changeset/1986 > > Thanks. > Fine with me. Brice
[hwloc-devel] Please review r1986
I fixed some compiler warnings in r1986 -- I have mixed feelings about renaming local variables named "index" and "y1". :-\ https://svn.open-mpi.org/trac/hwloc/changeset/1986 Thanks. -- Jeff Squyres jsquy...@cisco.com For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
[hwloc-devel] hwloc_topology_export_xml()
Doing some compiler warning validation this morning, it looks like topology-xml.c:hwloc_topology_export_xml() creates a DTD by calling xmlCreateIntSubset() but then never does anything with this DTD. Is the call to xmlCreateIntSubset() necessary? If so, does the resulting dtd need to be used and later freed? -- Jeff Squyres jsquy...@cisco.com For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/