[Bug 206335] clang++ -x c++ issue : expected unqualified-id
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Feb 21 13:08:29 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206335
--- Comment #3 from Hubert Drogosz <hubertus21 at gmail.com> ---
It seems to me that it isn't a bug. For me clang does what it should do.
Taking from clang man page:
-x <language>
Treat subsequent input files as having type language.
So for me it means that it should treat every file after -x option as file of
this type.
As you're passing object file (test-function.o) after -x c++ option, it tries
to interpret this file like c++ source file, and it fails.
I think you should compile it this way:
clang++ -o test-x_cpp test-function.o -x c++ test-x_cpp.c
Unfortunately, there isn't an option to pass object file after using -x option,
so object files should be passed before using any -x option.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list