http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58103
Bug ID: 58103 Summary: Error in handling of command line parameters in main(int argc, char *argv[]), in case of ???..? Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: heinz.dobler at gmx dot at Created attachment 30624 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30624&action=edit compile and execute with command line a.exe ??? or a.out ??? There is an error in the handling of command line parameters for the main function: int main(int argc, char *argv[]) { printf("%s", argv[1]); ... } The arguments argc and argv have invalid values when the executable is called with command line parameters consisting of at least three question marks, e.g.: a.exe ??? or a.out ??? The more question marks, the more interesting the results. My program lists directory names.