Compiler showing 'pi' symbol on error
Question:
I was testing some code on Coliru, and I got a strange output. I went down the code and could reproduce it with this simple
piece of code:
int main()
{
π
}
The output on g++:

clang:

For instance, using just pi (without the address-of) shows the expected result:
main.cpp:3:5: error: 'pi' was not declared in this scope
pi;
^
I tried to reproduce this on my machine, using g++ 4.9.2 and on others sites but I could not.
Is this some bug on this site, some config of these compilers ?
And why only using the address-of operator (&) shows this symbol ?
Answer:
It's a bug on the site, as the compiler's output is not properly escaped. The compiler should output
π, but that's valid HTML, producing the pi symbol you see.
website:
http://stackoverflow.com/questions/28885876/compiler-showing-pi-symbol-on-error
Compiler showing 'pi' symbol on error的更多相关文章
- ssh升级以及ssh: symbol lookup error: ssh: undefined symbol: EVP_aes_128_ctr错误处理
1.解压安装openssl包:(不能卸载openssl,否则会影响系统的ssl加密库文件,除非你可以做两个软连接libcryto和libssl) # tar -zxvf openssl-1.0.1.t ...
- mysql: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol: UP
Error Symptom: when you run $mysql -u root -p command in the linux you get an error message ” mysql: ...
- centos perl: symbol lookup error: /usr/local/lib64/perl5/auto/DBD/mysql/mysql.so: undefined symbol: mysql_init
之前在安装天兔数据库监控工具lepus的时候,运行时一直报perl: symbol lookup error: /usr/local/lib64/perl5/auto/DBD/mysql/mysql. ...
- fastDfs V5.02 升级到 V5.08版本后,启动报错:symbol lookup error: /usr/bin/fdfs_trackerd: undefined symbol: g_current_time
/libfastcommon-1.0.36 # ./make.sh cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o hash.o ...
- 由一次 symbol lookup error 引发的思考
开发一个跨平台的项目的时候,大部分时候都是在VS下进行编码,所以也就使用了VS的解决方案来管理项目. 因为要跨平台,当时网上看scons这个工具不错,所以在linux下就使用了scons来作为编译脚本 ...
- ldd "symbol lookup error"问题解决
http://www.linuxquestions.org/questions/slackware-14/symbol-lookup-error-usr-lib-libgtk-x11-2-0-so-0 ...
- 写动态库时遇到了symbol lookup error问题
之前写TLPI上的代码一直是手动进行错误处理,感觉代码冗余量很大,最后还是决定使用书上的tlph_hdr.h,顺便回顾下动态库的创建/使用. 参考很久之前的一篇博客 linux上静态库和动态库的编译和 ...
- symbol lookup error *** , undefined symbol 错误
在重装samba过程后遇到一些问题,使用 gdb 时产生报错: gdb: symbol lookup error: gdb: undefined symbol: PyUnicodeUCS2_FromE ...
- gpg: symbol lookup error
今天使用sudo apt-get 安装包的时候,出现gpg错误,如下: gpg: symbol lookup error: /usr/local/lib/libreadline.so.6: undef ...
随机推荐
- Python学习第三章
1.模块: 其实每个.py文件本身就是一个模块,当读者做完了一个.py文件,如果别人打算直接分享你的成果,只要在他编写的.py文件中倒入(import)就好了. 比如想在hello1.py文件里直接使 ...
- [Project] SpellCorrect源码详解
该Project原来的应用场景是对电商网站中输入一个错误的商品名称进行智能纠错,比如iphoae纠错为iphone.以下介绍的这个版本对其作了简化,项目源代码地址参见我的github:https:// ...
- Mybatis关系映射
一.一对一关系映射 使用resultType+包装类实现 1.假设问题背景是要求在某一个购物平台的后台程序中添加一个这样的功能:查询某个订单的信息和下该订单的用户信息.首先我们可以知道,一般这样的平台 ...
- linux中环境变量PATH设置错误,导致ls cd 等命令不能使用,提示:没有那个文件或目录
在CentOS7中执行了 PATH=/opt/:$PATH 然后执行ls时,出现 ls-bash: ls: 没有那个文件或目录 试了试其他命令也一样无法使用 后来执行 : export PATH=/u ...
- 一站式SpringBoot for NoSQL Study Tutorial 开发教程学习手册
SpringBoot2.0 + NoSQL使用教程,项目名称:“SpringBoot2NoSQL” 项目地址: https://gitee.com/475660/SpringBoot2NoSQL 项目 ...
- django--form相关
简单用法: Django提供 Form组件: 1. 定义规则 from django.forms import Form ...
- Kotlin 最佳实践
为什么写此文 Kotlin很烦,Gralde很烦,还都是升级狂,加一块更烦.几个月不接触Kotlin,再次上手时便一片迷茫.所以记录此文,以便再次上手时查阅. 使用Gradle创建Kotlin项目 m ...
- TCP/IP 笔记 - 广播和本地组播
在之前第二章介绍IP寻址的时候有介绍到,IP地址有4种:单播.组播.广播.任播. 单播,客户端与服务器之间点到点连接通信: 组播,在发送者和多个接收者(如某个特定的分组)之间实现点对多点的连接通信: ...
- 前端通信:ajax设计方案(十)--- 完善Promise A+规范,增加mock数据功能
半年不迭代,迭代搞半年,说的就是我,这里有点尴尬了,直接进入主题吧 我记得在这篇博客的时候集成了Promise的,不过那个时候就简简单单的写了一点最基础,在一些特殊的case上,还是有点问题的,所以才 ...
- SQL 必知必会·笔记<9>使用子查询
子查询(subquery),即嵌套在其他查询中的查询. 1. 利用子查询进行过滤 SELECT 语句中,子查询总是从内向外处理.示例: SELECT cust_name, cust_contact F ...