[Bug c++/95029] Compile error when using constant variable instead of literal

2020-05-11 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95029 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/95029] Compile error when using constant variable instead of literal

2020-05-09 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95029 --- Comment #3 from Andrew Pinski --- > PacketFragmenting frag(MaxPacketSize(MAX_PACKET_SIZE), PhySize(PHY_SIZE)); I was going to say this defines a function, frag which takes MaxPacketSize and PhySize as arguments and returns PacketFragmenting

[Bug c++/95029] Compile error when using constant variable instead of literal

2020-05-09 Thread maxi.matthe at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95029 --- Comment #2 from Maximilian Matthe --- Unfortunately, this seems to be a hard-to-spot case of the most vexing parse (just tried with clang, whose warning pointed me into that direction). https://www.fluentcpp.com/2018/01/30/most-vexing-parse

[Bug c++/95029] Compile error when using constant variable instead of literal

2020-05-09 Thread maxi.matthe at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95029 --- Comment #1 from Maximilian Matthe --- Created attachment 48495 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48495&action=edit The corresponding .ii-file