This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

new warning on the 3.0 branch


There is a new warning that appeared last week on the 3.0 branch, which I
suspect comes from Nathan's recent changes.
Compiling the following program with "g++ -Wall" :

struct empty{};

int main()
{
  empty a, b;
  a = b;
  return 0;
}

produces the warning :
empty_copy_warning.C:7: warning: statement with no effect

There was no such warning before.  I find this behaviour painful when dealing
with template arguments types, which can be empty or not.  If this is
considered a misfeature, then it's a regression from 3.0.
If not, is there a nice way to get rid of this warning ?
I can file a bug in GNATS if needed.

-- 
Sylvain


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]