Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Feb 2016 13:08:29 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 206335] clang++ -x c++ issue : expected unqualified-id
Message-ID:  <bug-206335-8-p9G4FJBGl0@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-206335-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-206335-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206335

--- Comment #3 from Hubert Drogosz <hubertus21@gmail.com> ---
It seems to me that it isn't a bug. For me clang does what it should do.=20
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 tri=
es
to interpret this file like c++ source file, and it fails.=20
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 opt=
ion,
so object files should be passed before using any -x option.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-206335-8-p9G4FJBGl0>