https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79318
Bug ID: 79318 Summary: conversion member function preceded with & is not marked as error Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gcc at mailinator dot com Target Milestone: --- See example and discussion on https://stackoverflow.com/questions/41954449/what-does-gccs-conversion-function-operator-int-do Conversion member function declaration like &operator int (); does not produce a warning or error and is interpreted as operator int& (); by GCC. It fails on e.g. CLANG. Usage of & in front of operator seems not to be covered by the language definition. Verified up to gcc 6.3.