Ticket #918 (closed bug: fixed)

Opened 3 weeks ago

Last modified 3 weeks ago

Build warnings with --enable-strict=noopt

Reported by: balaji Owned by: buntinas
Priority: major Milestone: mpich2-1.2.1
Component: mpich2 Keywords:
Cc:

Description

There are several warnings with compiled with --enable-strict=noopt with respect to returning structures.

Attachments

Change History

Changed 3 weeks ago by buntinas

  • status changed from new to closed
  • resolution set to fixed

Fixed in r5673.

Returning structures is legal in ANSI C, so it appears that this is just a performance-related warning. Aggregate return values may be returned in memory rather than by register. There are places where we do return structures, but these structures have a single element of a basic type which are used for type checking (to make sure we don't assign a relative pointer to an absolute pointer and vv). With optimization, the aggregate return is converted to a basic type anyway.

Changed 3 weeks ago by balaji

  • status changed from closed to reopened
  • resolution fixed deleted

It doesn't look like this problem is fixed. I still get the same warnings:

gcc -DHAVE_CONFIG_H -I. -I/home/balaji/software/mpich2/trunk/trunk/src/mpid/ch3/channels/nemesis/nemesis/src -I. -I../include -I/home/balaji/software/mpich2/trunk/trunk/src/ch3/channels/nemesis/nemesis/include -I/home/balaji/software/mpich2/trunk/trunk/src/include -I/home/balaji/software/mpich2/trunk/build/src/include -I/home/balaji/software/mpich2/trunk/build/src/util/wrappers -g -Wall -Wextra -Wno-missing-field-initializers -Wstrict-prototypes -Wmissing-prototypes -DGCC_WALL -Wno-unused-parameter -Wno-unused-label -Wshadow -Wmissing-declarations -Wno-long-long -Wfloat-equal -Wdeclaration-after-statement -Wundef -Wno-endif-labels -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wno-sign-compare -Waggregate-return -Wold-style-definition -Wno-multichar -Wno-deprecated-declarations -Wpacked -Wnested-externs -Winvalid-pch -Wno-pointer-sign -Wvariadic-macros -std=c89 -Wno-format-zero-length -Wno-type-limits -D_POSIX_C_SOURCE=199506L -I/home/balaji/software/mpich2/trunk/trunk/src/openpa/src -I/home/balaji/software/mpich2/trunk/build/src/openpa/src -DUSE_PROCESS_LOCKS -I/home/balaji/software/mpich2/trunk/build/src/mpid/ch3/include -I/home/balaji/software/mpich2/trunk/trunk/src/mpid/ch3/include -I/home/balaji/software/mpich2/trunk/build/src/mpid/common/datatype -I/home/balaji/software/mpich2/trunk/trunk/src/mpid/common/datatype -I/home/balaji/software/mpich2/trunk/build/src/mpid/common/locks -I/home/balaji/software/mpich2/trunk/trunk/src/mpid/common/locks -I/home/balaji/software/mpich2/trunk/build/src/mpid/ch3/channels/nemesis/include -I/home/balaji/software/mpich2/trunk/trunk/src/mpid/ch3/channels/nemesis/include -I/home/balaji/software/mpich2/trunk/build/src/mpid/ch3/channels/nemesis/nemesis/include -I/home/balaji/software/mpich2/trunk/trunk/src/mpid/ch3/channels/nemesis/nemesis/include -I/home/balaji/software/mpich2/trunk/build/src/mpid/ch3/channels/nemesis/nemesis/utils/monitor -I/home/balaji/software/mpich2/trunk/trunk/src/mpid/ch3/channels/nemesis/nemesis/utils/monitor -I/home/balaji/software/mpich2/trunk/build/src/mpid/common/locks -I/home/balaji/software/mpich2/trunk/trunk/src/mpid/common/locks -I/home/balaji/software/mpich2/trunk/build/src/util/wrappers -I/home/balaji/software/mpich2/trunk/trunk/src/util/wrappers -c /home/balaji/software/mpich2/trunk/trunk/src/mpid/ch3/channels/nemesis/nemesis/src/mpid_nem_queue.c
In file included from /home/balaji/software/mpich2/trunk/trunk/src/mpid/ch3/channels/nemesis/nemesis/include/mpid_nem_pre.h:12,
                 from /home/balaji/software/mpich2/trunk/trunk/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h:9,
                 from /home/balaji/software/mpich2/trunk/trunk/src/mpid/ch3/include/mpidpre.h:30,
                 from /home/balaji/software/mpich2/trunk/trunk/src/include/mpiimpl.h:120,
                 from /home/balaji/software/mpich2/trunk/trunk/src/mpid/ch3/include/mpidimpl.h:22,
                 from /home/balaji/software/mpich2/trunk/trunk/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h:11,
                 from /home/balaji/software/mpich2/trunk/trunk/src/mpid/ch3/channels/nemesis/nemesis/include/mpid_nem_impl.h:11,
                 from /home/balaji/software/mpich2/trunk/trunk/src/mpid/ch3/channels/nemesis/nemesis/src/mpid_nem_queue.c:7:
/home/balaji/software/mpich2/trunk/trunk/src/mpid/ch3/channels/nemesis/nemesis/include/mpid_nem_defs.h: In function 'MPID_NEM_ABS_TO_REL':
/home/balaji/software/mpich2/trunk/trunk/src/mpid/ch3/channels/nemesis/nemesis/include/mpid_nem_defs.h:52: warning: function returns an aggregate
/home/balaji/software/mpich2/trunk/trunk/src/mpid/ch3/channels/nemesis/nemesis/src/mpid_nem_queue.c: In function 'MPID_nem_dump_cell_mpich':
/home/balaji/software/mpich2/trunk/trunk/src/mpid/ch3/channels/nemesis/nemesis/src/mpid_nem_queue.c:32: warning: function call has aggregate value

Changed 3 weeks ago by buntinas

What are your configure options? This works for me with a new checkout with these options:

../mpich2/configure --disable-fast --disable-mpe --disable-romio --disable-cxx --disable-f77 --disable-f90 --enable-g=all --with-pm=hydra:mpd --enable-strict=noopt

Are you sure you svn up, maint/update and reconfigured?

Changed 3 weeks ago by balaji

Here are my configure options:

--prefix=/home/balaji/software/mpich2/trunk/build --disable-mpe --disable-romio --enable-g=dbg --enable-dependencies --disable-spawn --with-pm=hydra --with-pmi=simple --disable-cxx --disable-f77 --disable-f90 --enable-strict=noopt --disable-fast

My --enable-g option is different (--enable-g=dbg instead of --enable-g=all). And I did an "svn up" and maint/updatefiles -- notice the -Waggregate-return option in my compile line.

Changed 3 weeks ago by balaji

  • status changed from reopened to closed
  • resolution set to fixed

Never mind that. This works correctly. My git setup seems to be giving some problems once in a while.

WARNING! You need to either login using OpenID here or enter your email address here before you can create or edit tickets. Otherwise the ticket will get treated as spam. More information on creating tickets can be found here.

Don't forget to add your email address to the cc list to make sure that you get updated of the ticket status.

Add/Change #918 (Build warnings with --enable-strict=noopt)

Author



Change Properties
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.