]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
* doc/xml/manual/status_cxx2017.xml: Update status tables.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
f77c0292 12015-06-04 Andrew MacLeod <amacleod@redhat.com>
2
3 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4 * c-aux-info.c: Likewise.
5 * c-convert.c: Likewise.
6 * c-decl.c: Likewise.
7 * c-errors.c: Likewise.
8 * c-lang.c: Likewise.
9 * c-objc-common.c: Likewise.
10 * c-parser.c: Likewise.
11 * c-typeck.c: Likewise.
12
b44134dc 132015-06-04 Marek Polacek <polacek@redhat.com>
14
15 PR c/66341
16 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
17 it is a lvalue.
18
d1df0bfc 192015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20
21 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
22 Warn for empty struct.
23 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
24
f8363c5d 252015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
26
27 * c-decl.c (start_function): Call plugin before parsing.
28 (finish_function): Call plugin after parsing.
29
5b9761f5 302015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
31
32 PR c/49551
33 * c-decl.c (merge_decls): Merge DECL_COMMON.
34
eeec71b4 352015-05-22 Jim Wilson <jim.wilson@linaro.org>
36
37 * Make-lang.in (check_gcc_pallelize): Define.
38
5a4c69dd 392015-05-22 Marek Polacek <polacek@redhat.com>
40
41 PR c/47043
42 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
43 attributes.
44
5650b4ff 452015-05-21 Marek Polacek <polacek@redhat.com>
46
47 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
48 DECL_BUILT_IN.
49
b443c459 502015-05-20 Marek Polacek <polacek@redhat.com>
51
52 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
53 * c-typeck.c: Likewise.
54
9e73638f 552015-05-19 Marek Polacek <polacek@redhat.com>
56
57 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
58
d7729e26 592015-05-19 Jakub Jelinek <jakub@redhat.com>
60
61 PR middle-end/66199
62 * c-parser.c (c_parser_omp_for_loop): Don't add
63 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
64 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
65 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
66 constructs.
67
dfcf26a5 682015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
69
70 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
9e73638f 71 swaps.
dfcf26a5 72
09172322 732015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
74
75 PR fortran/44054
76 * c-objc-common.c (c_tree_printer): Replace locus pointer with
77 accessor function.
78
aac24642 792015-05-14 Marek Polacek <polacek@redhat.com>
80
81 PR c/66066
82 PR c/66127
83 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
84 rather than with 0.
85
e5f01cba 862015-05-12 David Malcolm <dmalcolm@redhat.com>
87
88 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
89 to add a call to warn_for_misleading_indentation.
90 (c_parser_else_body): Likewise, adding param "else_loc".
91 (c_parser_if_statement): Check for misleading indentation.
92 (c_parser_while_statement): Likewise.
93 (c_parser_for_statement): Likewise.
94
dc5945dc 952015-05-08 Marek Polacek <polacek@redhat.com>
96
97 PR c/64918
98 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
99 (output_init_element): Likewise.
100
cdc64059 1012015-05-07 Marek Polacek <polacek@redhat.com>
102
103 PR c/65179
104 * c-typeck.c (build_binary_op): Warn when left shifting a negative
105 value.
106
6fa7118e 1072015-04-30 Marek Polacek <polacek@redhat.com>
108
109 * c-typeck.c (set_init_label): Call error_at instead of error and
110 pass LOC to it.
111
98f44804 112 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
113 the type of a decl.
114
2cd7caae 115 * c-typeck.c (c_build_va_arg): Clarify the error message.
116
95cfd391 1172015-04-29 Thomas Schwinge <thomas@codesourcery.com>
118
119 * c-parser.c (c_parser_oacc_enter_exit_data): Use
120 OMP_STANDALONE_CLAUSES.
121
e65e39f8 1222015-04-28 Marek Polacek <polacek@redhat.com>
123
124 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
125
5580bf42 1262015-04-28 Marek Polacek <polacek@redhat.com>
127
128 PR c/65901
129 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
130
c3468fc2 1312015-04-25 Marek Polacek <polacek@redhat.com>
132
133 PR c/52085
134 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
135 attribute.
136
0cd6b1b4 1372015-04-23 Marek Polacek <polacek@redhat.com>
138
139 PR c/65345
140 * c-decl.c (set_labels_context_r): New function.
141 (store_parm_decls): Call it via walk_tree_without_duplicates.
142 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
143 instead of create_tmp_var. Build TARGET_EXPR instead of
144 COMPOUND_EXPR.
145 (build_atomic_assign): Use create_tmp_var_raw instead of
146 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
147
05a827ce 1482015-04-20 Ilya Verbin <ilya.verbin@intel.com>
149
150 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
151 (c_parser_omp_target_update): Add missed %> to error_at ().
152
de801c28 1532015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
154
155 PR target/55143
156 * c-decl.c (c_default_pointer_mode): Remove definition.
157 * c-tree.h (c_default_pointer_mode): Remove declaration.
158
c3b1dca4 1592015-03-27 Tobias Burnus <burnus@net-b.de>
160
161 PR c/65586
162 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
163 error out.
164 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
165 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
166 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
167
1443772f 1682015-03-19 Jakub Jelinek <jakub@redhat.com>
169
170 * c-decl.c (c_decl_attributes): Also add "omp declare target"
171 attribute for DECL_EXTERNAL VAR_DECLs.
172
76738f56 1732015-03-11 Jakub Jelinek <jakub@redhat.com>
174
175 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
176 argument.
177
16f958b3 1782015-03-10 Jakub Jelinek <jakub@redhat.com>
179
180 PR c/65120
181 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
182 before preparing arguments to warn_logical_not_parentheses.
183
6054103a 1842015-03-09 Jakub Jelinek <jakub@redhat.com>
185
186 PR c/65120
187 * c-typeck.c (parser_build_binary_op): Don't warn for
188 !!x == y or !b == y where b is _Bool.
189
de3a1e03 1902015-03-09 Marek Polacek <polacek@redhat.com>
191
192 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
193 * c-decl.c (grokdeclarator): Likewise.
194 * c-typeck.c (build_binary_op): Likewise.
195
084e6bf0 1962015-02-27 Marek Polacek <polacek@redhat.com>
197
198 PR c/65228
199 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
200
4d7c4134 2012015-02-14 Marek Polacek <polacek@redhat.com>
202
203 PR c/64768
204 * c-decl.c (grokdeclarator): Set the range of a flexible array member
205 declared through a typedef name.
206
b1380826 2072015-02-13 Marek Polacek <polacek@redhat.com>
208
209 PR c/65050
210 * c-decl.c (grokdeclarator): Print also the type when giving
211 the error message about array's incomplete element type.
212
35ff54b5 2132015-02-11 Jakub Jelinek <jakub@redhat.com>
214
215 PR c/64824
216 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
217 check in the POP macro.
218
46861609 2192015-02-09 Marek Polacek <polacek@redhat.com>
220
221 PR c/64856
222 * c-typeck.c (process_init_element): Don't always wrap
223 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
224 initializing a range of elements.
225
bbf8fbec 2262015-02-04 Jakub Jelinek <jakub@redhat.com>
227
228 PR c/64824
229 PR c/64868
230 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
231
46861609 2322015-02-02 Bruno Loff <bruno.loff@gmail.com>
1f0ce3ac 233
234 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
235 processing enum declaration.
236
70279be9 2372015-01-29 Marek Polacek <polacek@redhat.com>
238
239 PR c/64709
240 * c-typeck.c (pop_init_level): If constructor_elements has
241 exactly one element with integer_zerop value, set constructor_zeroinit
242 to 1. Remove braces around warning_init call.
243
591970b4 2442015-01-27 Jakub Jelinek <jakub@redhat.com>
245
246 PR c/64766
247 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
248 of FUNCTION_DECLs with error_mark_node.
249
87778dc4 2502015-01-26 Jakub Jelinek <jakub@redhat.com>
251
252 PR c/64778
253 * c-typeck.c (convert_arguments): Return -1 if there are
254 error_args, even if we've diagnosed too many arguments.
255
cffdfb3d 2562015-01-21 Richard Biener <rguenther@suse.de>
257
258 PR middle-end/64313
259 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
260 for builtins the user declared correctly.
261
ca4c3545 2622015-01-15 Thomas Schwinge <thomas@codesourcery.com>
263 Bernd Schmidt <bernds@codesourcery.com>
264 Cesar Philippidis <cesar@codesourcery.com>
265 James Norris <jnorris@codesourcery.com>
266 Jakub Jelinek <jakub@redhat.com>
267 Ilmir Usmanov <i.usmanov@samsung.com>
268
269 * c-parser.c: Include "gomp-constants.h".
270 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
271 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
272 Use OMP_CLAUSE_SET_MAP_KIND.
273 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
274 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
275 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
276 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
277 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
278 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
279 "copyout", "create", "delete", "deviceptr", "gang", "host",
280 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
281 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
282 "present_or_create", "pcreate", "seq", "self", "vector",
283 "vector_length", "wait", "worker".
284 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
285 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
286 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
287 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
288 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
289 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
290 (c_parser_oacc_data_clause_deviceptr)
291 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
292 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
293 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
294 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
295 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
296 (c_parser_oacc_parallel, c_parser_oacc_update)
297 (c_parser_oacc_wait): New functions.
298 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
299 (c_finish_oacc_data): New prototypes.
300 * c-typeck.c: Include "gomp-constants.h".
301 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
302 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
303 OMP_CLAUSE_SET_MAP_KIND.
304 (c_finish_oacc_parallel, c_finish_oacc_kernels)
305 (c_finish_oacc_data): New functions.
306 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
307 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
308 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
309 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
310 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
311 GOMP_MAP_FORCE_DEVICEPTR.
312
1f78217c 3132015-01-09 Michael Collison <michael.collison@linaro.org>
314
315 * c-array-notation.c: Include hash-set.h, machmode.h,
316 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
317 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
318 * c-aux-info.c: Ditto.
319 * c-convert.c: Ditto.
320 * c-decl.c: Ditto.
321 * c-errors.c: Ditto.
322 * c-lang.c: Dittoxs.
323 * c-objc-common.c: Ditto.
324 * c-parser.c: Ditto.
325 * c-typeck.c: Include hash-set.h, machmode.h,
326 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
327 fold-const.h, wide-int.h, inchash.h, real.h and
328 fixed-value.h due to flattening of tree.h.
329
15e18a8c 3302015-01-07 Marek Polacek <polacek@redhat.com>
331
332 PR c/64417
333 * c-typeck.c (process_init_element): Disallow initialization of
334 a flexible array member with a string constant if the structure
335 is in an array.
336
d353bf18 3372015-01-05 Jakub Jelinek <jakub@redhat.com>
338
823a9dd4 339 PR sanitizer/64344
340 * c-typeck.c (convert_for_assignment, c_finish_return): For
341 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
342 types also set in_late_binary_op around convert call.
343 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
344 to integral type casts, if not in_late_binary_op, pass c_fully_fold
345 result on expr as last argument to ubsan_instrument_float_cast,
346 if in_late_binary_op, don't use c_save_expr but save_expr.
347
d353bf18 348 Update copyright years.
349
92b63884 3502015-01-05 Marek Polacek <polacek@redhat.com>
351
352 PR c/64423
353 * c-typeck.c (build_array_ref): Pass loc down to
354 warn_array_subscript_with_type_char.
355
8a8211df 3562014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
357
358 * c-typeck.c: New behavious for pointers to arrays with qualifiers
359 (common-pointer-type): For pointers to arrays take qualifiers from
360 element type.
361 (build_conditional_expr): Add warnings for lost qualifiers.
362 (comp-target-types): Allow pointers to arrays with different qualifiers.
363 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
364 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
365 to PEDWARN_FOR_QUALIFIERS.
366
35ea0139 3672014-12-17 Jakub Jelinek <jakub@redhat.com>
368
369 PR sanitizer/64289
370 * c-convert.c: Include ubsan.h.
371 (convert): For real -> integral casts and
372 -fsanitize=float-cast-overflow don't call convert_to_integer, but
373 instead instrument the float cast directly.
374
f9e245b2 3752014-11-29 Jakub Jelinek <jakub@redhat.com>
376
377 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
378 c_finish_stmt_expr): Remove NULL last argument from
379 create_tmp_var_raw and create_tmp_var calls.
380 * c-array-notation.c (fix_builtin_array_notation_fn,
381 build_array_notation_expr, fix_conditional_array_notations_1,
382 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
383
fce2dbd1 3842014-11-28 Marek Polacek <polacek@redhat.com>
385
386 PR c/63862
387 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
388 convert the right operand to integer type.
389
396c36b7 3902014-11-25 Marek Polacek <polacek@redhat.com>
391
392 PR c/63877
393 * c-decl.c (start_function): Disable -Wmissing-declarations warning
394 for inline functions.
395
c61ef207 3962014-11-21 Jakub Jelinek <jakub@redhat.com>
397
398 PR target/63764
399 * c-typeck.c (build_array_ref): Adjust
400 convert_vector_to_pointer_for_subscript caller. If it returns true,
401 call non_lvalue_loc on the result.
402
565353e8 4032014-11-11 Richard Biener <rguenther@suse.de>
404
405 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
406 to true.
407
fdd735a7 4082014-11-10 Andi Kleen <ak@linux.intel.com>
409
410 PR c/60804
411 * c-parser.c (c_parser_statement_after_labels): Call
412 check_no_cilk.
413 (c_parser_if_statement): Dito.
414 (c_parser_switch_statement): Dito.
415 (c_parser_while_statement): Dito.
416 (c_parser_do_statement): Dito.
417 (c_parser_for_statement): Dito.
418 * c-typeck.c (c_finish_loop): Dito.
419
0feb4de1 4202014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
421
422 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
423 OPT_Wshift_count_overflow in the warnings.
424
a3fec48a 4252014-10-30 Marek Polacek <polacek@redhat.com>
426
427 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
428 print the stripped version as well, if they're not the same.
429
3754d046 4302014-10-29 Richard Sandiford <richard.sandiford@arm.com>
431
432 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
433 machine_mode.
434
1140c305 4352014-10-28 Andrew MacLeod <amacleod@redhat.com>
436
437 * c-decl.c: Adjust include files.
438 * c-parser.c: Ditto.
439
ab103e33 4402014-10-27 Phil Muldoon <pmuldoon@redhat.com>
441 Tom Tromey <tromey@redhat.com>
442
443 * c-tree.h (enum c_oracle_request): New.
444 (c_binding_oracle_function): New typedef.
445 (c_binding_oracle, c_pushtag, c_bind): Declare.
446 * c-decl.c (c_binding_oracle): New global.
447 (I_SYMBOL_CHECKED): New macro.
448 (i_symbol_binding): New function.
449 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
450 (I_TAG_CHECKED): New macro.
451 (i_tag_binding): New function.
452 (I_TAG_BINDING, I_TAG_DECL): Redefine.
453 (I_LABEL_CHECKED): New macro.
454 (i_label_binding): New function.
455 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
456 (c_print_identifier): Save and restore c_binding_oracle.
457 (c_pushtag, c_bind): New functions.
458
94ea8568 4592014-10-27 Andrew MacLeod <amacleod@redhat.com>
460
461 * c-typeck.c: Adjust include files.
462
32ecf960 4632014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
464
465 PR c++/53061
466 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
467 initialization here...
468 (c_initialize_diagnostics): ... but here. Set defaults after
469 building pretty-printer.
470
2981340f 4712014-10-23 Marek Polacek <polacek@redhat.com>
472
473 PR c/63626
474 * c-decl.c (pop_scope): Don't print warning in external_scope.
475
d303aeaf 4762014-10-19 Marek Polacek <polacek@redhat.com>
477
478 PR c/63567
479 * c-typeck.c (output_init_element): Allow initializing objects with
480 static storage duration with compound literals even in C99 and add
481 pedwarn for it.
482
bccf97da 4832014-10-17 Marek Polacek <polacek@redhat.com>
484
485 PR c/63567
486 * c-typeck.c (digest_init): Allow initializing objects with static
487 storage duration with compound literals even in C99 and add pedwarn
488 for it.
489
d9c77450 4902014-10-17 Marek Polacek <polacek@redhat.com>
491
492 PR c/63543
493 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
494 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
495 error multiple times. Print the type.
496
a2bbd0a7 4972014-10-17 Marek Polacek <polacek@redhat.com>
498
499 PR c/63549
500 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
501 type.
502
e610d2b2 5032014-10-17 Marek Polacek <polacek@redhat.com>
504
505 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
506 (start_function): Use OPT_Wimplicit_int instead of 0.
507 (store_parm_decls_oldstyle): Likewise.
508
6b6e56b6 5092014-10-17 Alan Modra <amodra@gmail.com>
510
511 PR middle-end/61848
512 * c-decl.c (merge_decls): Don't merge section name or tls model
513 to newdecl symtab node, instead merge to olddecl. Override
514 existing olddecl section name. Set tls_model for all thread-local
515 vars, not just OMP thread-private ones. Remove incorrect comment.
516
a3020f2f 5172014-10-16 Andrew MacLeod <amacleod@redhat.com>
518
519 * c-decl.c: Adjust include files.
520
9f75f026 5212014-10-14 DJ Delorie <dj@redhat.com>
522
523 * c-parser.c (c_parse_init): Add RID entries for each __intN.
524 (c_token_starts_typename): Check all __intN, not just __int128.
525 (c_token_starts_declspecs): Likewise.
526 (c_parser_declspecs): Likewise.
527 (c_parser_attribute_any_word): Likewise.
528 (c_parser_objc_selector): Likewise.
529 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
530 (struct c_declspecs): Add int_n_idx field to record *which* __intN
531 is specified.
532 * c-decl.c (declspecs_add_type): Check for all __intN, not just
533 __int128.
534 (finish_declspecs): Likewise.
535
4f284d4a 5362014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
537
538 * c-parser.c (c_parser_all_labels): New function to replace
539 the duplicate code.
540 (c_parser_statement): Call the new function.
541
61a892dc 5422014-10-09 Marek Polacek <polacek@redhat.com>
543
544 PR c/63480
545 * c-typeck.c (pop_init_level): Don't warn about initializing
546 with { }.
547
4e888fd9 5482014-10-07 Marek Polacek <polacek@redhat.com>
549
550 PR c/59717
551 * c-decl.c (header_for_builtin_fn): New function.
552 (implicitly_declare): Suggest which header to include.
553
224bdd51 5542014-10-07 Marek Polacek <polacek@redhat.com>
555
556 * c-convert.c (convert): Use error_operand_p.
557 * c-typeck.c (require_complete_type): Likewise.
558 (really_atomic_lvalue): Likewise.
559 (digest_init): Likewise.
560 (handle_omp_array_sections_1): Likewise.
561
a2bc79db 5622014-10-03 Marek Polacek <polacek@redhat.com>
563
564 PR c/63453
565 * c-decl.c (pop_scope): Don't warn about "inline function declared
566 but never defined" for functions marked with gnu_inline attribute.
567
4fc4088b 5682014-09-25 Jakub Jelinek <jakub@redhat.com>
569
570 PR c++/63249
571 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
572 on low_bound and length.
573
5213d6c9 5742014-09-24 Marek Polacek <polacek@redhat.com>
575
576 PR c/61405
577 PR c/53874
578 * c-parser.c: Don't define CPP_KEYWORD.
579 (c_parser_switch_statement): Pass original type to c_finish_case.
580 * c-tree.h (c_finish_case): Update declaration.
581 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
582 conditionally to c_do_switch_warnings.
583
6ea2b1bc 5842014-09-03 Marek Polacek <polacek@redhat.com>
585
586 PR c/62024
587 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
588 conversions.
589
40750995 5902014-09-02 Jakub Jelinek <jakub@redhat.com>
591 Balaji V. Iyer <balaji.v.iyer@intel.com>
592 Igor Zamyatin <igor.zamyatin@intel.com>
593
594 * c-parser.c (c_parser_cilk_for): New function.
595 (c_parser_cilk_grainsize): Likewise.
596 (c_get_temp_regvar): Likewise.
597 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
598 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
599 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
600 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
601 case.
602
8c583613 6032014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
604
605 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
606 with using HOST_WIDE_INT without truncation to 'int'
607
dc6229e8 6082014-08-22 Marek Polacek <polacek@redhat.com>
609
610 PR c++/62199
611 * c-typeck.c (parser_build_binary_op): Adjust call to
612 warn_logical_not_parentheses.
613
5fdda74b 6142014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
615
616 PR other/62008
617 * c-parser.c (c_parser_array_notation): Check for correct
618 type of an array added.
619
78bf4156 6202014-08-19 Marek Polacek <polacek@redhat.com>
621
622 PR c++/62153
623 * c-typeck.c (build_binary_op): If either operand of a comparison
624 is a boolean expression, call maybe_warn_bool_compare.
625
005b8fe7 6262014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
627
628 PR c/45584
629 * c-typeck.c (build_c_cast): Do a conversion even when the
630 TYPE_MAIN_VARIANTs are the same.
631
508ea33a 6322014-08-19 Marek Polacek <polacek@redhat.com>
633
634 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
635 pedwarn_c99 instead of pedwarn.
636 (grokfield): Likewise.
637 (warn_defaults_to): New function.
638 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
639 Unconditionally call pedwarn_c99 instead of pedwarn.
640 (start_function): Call warn_defaults_to instead of pedwarn_c99.
641 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
642 check flag_isoc11 before.
643 * c-errors.c (pedwarn_c99): Change the return type to bool.
644 Handle -Wc99-c11-compat.
645 * c-parser.c (disable_extension_diagnostics): Handle
646 warn_c99_c11_compat.
647 (restore_extension_diagnostics): Likewise.
648 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
649 instead of pedwarn, don't check flag_isoc11 before.
650 (c_parser_declspecs): Likewise.
651 (c_parser_alignas_specifier): Likewise.
652 (c_parser_alignof_expression): Likewise.
653 (c_parser_generic_selection): Likewise.
654 * c-tree.h (pedwarn_c99): Update declaration.
655 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
656 of pedwarn_c99.
657
806fe15e 6582014-08-19 Marek Polacek <polacek@redhat.com>
659
660 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
661 to pedwarn_c90.
662 * c-errors.c: Include "opts.h".
663 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
664 * c-parser.c (disable_extension_diagnostics): Handle negative value
665 of warn_c90_c99_compat, too.
666 (restore_extension_diagnostics): Likewise.
667 (c_parser_compound_statement_nostart): Pass
668 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
669
89868e45 6702014-08-12 Marek Polacek <polacek@redhat.com>
671
672 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
673 Add pedwarn.
674 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
675 Likewise.
676 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
677
890c2e2f 6782014-08-10 Marek Polacek <polacek@redhat.com>
679
680 PR c/51849
681 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
682 Call pedwarn_c90 instead of pedwarn.
683 (check_bitfield_type_and_width): Likewise.
684 (declspecs_add_qual): Likewise.
685 (declspecs_add_type): Likewise.
686 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
687 Adjust to only call pedwarn_c90.
688 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
689 pedwarn_c90 instead of pedwarn.
690 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
691 * c-parser.c (disable_extension_diagnostics): Handle
692 warn_c90_c99_compat.
693 (restore_extension_diagnostics): Likewise.
694 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
695 pedwarn_c90 instead of pedwarn.
696 (c_parser_initelt): Likewise.
697 (c_parser_postfix_expression): Likewise.
698 (c_parser_postfix_expression_after_paren_type): Likewise.
699 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
700 * c-tree.h: Fix formatting.
701 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
702 pedwarn_c90 instead of pedwarn.
703
7149db5f 7042014-08-07 Trevor Saunders <tsaunders@mozilla.com>
705
706 * c-typeck.c: Remove include of pointer-set.h.
707
1c75251e 7082014-08-07 Marek Polacek <polacek@redhat.com>
709
710 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
711
06ecf488 7122014-08-02 Trevor Saunders <tsaunders@mozilla.com>
713
714 * c-typeck.c: Use hash_map instead of pointer_map.
715
431205b7 7162014-08-02 Trevor Saunders <tsaunders@mozilla.com>
717
718 * c-decl.c: Use hash_set instead of pointer_set.
719
3394c80c 7202014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
721
722 PR middle-end/61455
723 * c-array-notation.c (expand_array_notations): Handling
724 of DECL_EXPR added.
725
f22a2cb7 7262014-07-31 Marc Glisse <marc.glisse@inria.fr>
727
728 PR c++/60517
729 * c-typeck.c (c_finish_return): Return 0 instead of the address of
730 a local variable.
731
74691f46 7322014-07-30 Tom Tromey <tromey@redhat.com>
733
734 * c-typeck.c (struct constructor_stack) <designator_depth>: New
735 field.
736 (really_start_incremental_init, push_init_level): Initialize
737 designator_depth.
738 (pop_init_level): Set global designator_depth.
739 (process_init_element): Check for designated_init attribute.
740
f9767fb6 7412014-07-20 Marek Polacek <polacek@redhat.com>
742
743 PR c/61852
744 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
745 (implicitly_declare): Pass location to implicit_decl_warning.
746
305d96bc 7472014-07-14 Jakub Jelinek <jakub@redhat.com>
748
749 PR middle-end/61294
750 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
751 If non-NULL, call c_parser_check_literal_zero.
752 (c_parser_check_literal_zero): New function.
753 (c_parser_postfix_expression_after_primary): Adjust
754 c_parser_expr_list caller, handle -Wmemset-transposed-args.
755
87d59e72 7562014-07-06 Marek Polacek <polacek@redhat.com>
757
758 PR c/6940
759 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
760 * c-tree.h (C_ARRAY_PARAMETER): Define.
761 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
762 function parameter.
763
752098c8 7642014-07-02 Jan Hubicka <hubicka@ucw.cz>
765 Chen Gang <gang.chen.5i5j@gmail.com>
766
767 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
768 releasing symbol.
769
1207866e 7702014-07-01 Marek Polacek <polacek@redhat.com>
771
772 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
773 instead of 0 to WARN_FOR_ASSIGNMENT.
774
7a6bbb76 7752014-07-01 Marek Polacek <polacek@redhat.com>
776
777 PR c/58286
778 * c-typeck.c (convert_for_assignment): Pass
779 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
780
70575064 7812014-06-30 Marek Polacek <polacek@redhat.com>
782
783 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
784 has no_sanitize_undefined attribute.
785
4879e4cf 7862014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
787
788 PR middle-end/57541
789 * c-array-notation.c (fix_builtin_array_notation_fn):
790 Check for 0 arguments in builtin call. Check that bultin argument is
791 correct.
792 * c-parser.c (c_parser_array_notation): Check for incorrect initial
793 index.
794
45c5b823 7952014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
796
797 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
798 qualifiers in __auto_type for atomic types.
799 (c_parser_typeof_specifier): Discard all type qualifiers in
800 __typeof__ for atomic types.
801
430b73ee 8022014-06-25 Marek Polacek <polacek@redhat.com>
803
804 PR c/61162
805 * c-parser.c (c_parser_statement_after_labels): Pass the location of
806 the return expression to c_finish_return.
807
9580cb79 8082014-06-25 Jakub Jelinek <jakub@redhat.com>
809
810 * c-typeck.c (c_finish_omp_clauses): Make sure
811 OMP_CLAUSE_LINEAR_STEP has correct type.
812
c1f445d2 8132014-06-24 Trevor Saunders <tsaunders@mozilla.com>
814
815 * c-decl.c: Adjust.
816
e471cc6f 8172014-06-24 Jakub Jelinek <jakub@redhat.com>
818
819 * c-parser.c (c_parser_omp_for_loop): For
820 #pragma omp parallel for simd move lastprivate clause from parallel
821 to for rather than simd.
822
499b7390 8232014-06-23 Marek Polacek <polacek@redhat.com>
824
825 * c-typeck.c (parser_build_binary_op): Don't call
826 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
827
5e68df57 8282014-06-15 Jan Hubicka <hubicka@ucw.cz>
829
830 * c-parser.c (c_parser_omp_threadprivate): Likewise.
831 * c-decl.c (merge_decls): Likewise.
832
064b0d02 8332014-06-09 Marek Polacek <polacek@redhat.com>
834
835 PR c/36446
836 * c-typeck.c (error_init): Call inform instead of error_at.
837 (pedwarn_init): Call inform instead of pedwarn.
838 (warning_init): Call inform instead of warning_at.
839
71e19e54 8402014-06-07 Jan Hubicka <hubicka@ucw.cz>
841
842 * c-decl.c (merge_decls): Use set_decl_section_name.
843 (duplicate_decls): Remove node if it exists.
844
95cdf3fd 8452014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
846
847 PR c/53119
848 * c-typeck.c (push_init_level, process_init_element,
849 pop_init_level): Correct check for zero initialization, move
850 missing brace warning to respect zero initialization.
851
a07f86a6 8522014-06-05 Marek Polacek <polacek@redhat.com>
853
854 PR c/56724
855 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
856
32dc1512 8572014-06-05 Marek Polacek <polacek@redhat.com>
858
859 PR c/49706
860 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
861 on the left hand side operand of a comparison.
862
64cf1262 8632014-06-05 Marek Polacek <polacek@redhat.com>
864
865 PR c/48062
866 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
867 Print note only if the warning was printed.
868
071f6d39 8692014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
870
871 PR c/58942
872 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
873 with a pointer.
874
c69ec07d 8752014-06-03 Marek Polacek <polacek@redhat.com>
876
877 PR c/60439
878 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
879 c_start_case.
880 * c-tree.h (c_start_case): Update.
881 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
882 switch condition has boolean value.
883
f7715905 8842014-06-02 Andrew MacLeod <amacleod@redhat.com>
885
886 * c-decl.c: Include builtins.h.
887 * c-parser.c: Likewise.
888
dcfff6f9 8892014-05-27 Marek Polacek <polacek@redhat.com>
890
891 PR c/56724
892 * c-typeck.c (convert_arguments): Get location of a parameter. Change
893 error and warning calls to error_at and warning_at. Pass location of
894 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
895 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
896 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
897
c048c42c 8982014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
899
900 PR c/61191
901 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
902 function parameters.
903
8c016392 9042014-05-23 Jan Hubicka <hubicka@ucw.cz>
905
906 * c-decl.c (merge_decls): Preserve symtab node pointers.
907 (duplicate_decls): Free new decl.
908
184a718f 9092014-05-23 Thomas Schwinge <thomas@codesourcery.com>
910
6ce915ef 911 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
912 initialization.
913
184a718f 914 * c-parser.c (c_parser_omp_target): Return bool values.
915
22ac3f78 9162014-05-22 Thomas Schwinge <thomas@codesourcery.com>
917
918 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
919 num_teams_loc variable to num_thread_limit_loc.
920
3ab4693e 9212014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
922
923 * c-array-notation.c (expand_array_notations): Use void_node
924 instead of void_zero_node.
925
25a27413 9262014-05-17 Trevor Saunders <tsaunders@mozilla.com>
927
928 * c-decl.c (finish_struct): Adjust.
929 (finish_enum): Likewise.
930 (bind): Adjust.
931 (record_inline_static): Likewise.
932 (push_scope): Likewise.
933 (make_label): Likewise.
934 (lookup_label_for_goto): Likewise.
935 (finish_struct): Likewise.
936 (finish_enum): Likewise.
937 (store_parm_decls): Likewise.
938 (c_push_function_context): Likewise.
939 * c-lang.h: Remove usage of variable_size gty attribute.
940 * c-parser.c (c_parse_init): Adjust.
941 (c_parse_file): Likewise.
942
172b8440 9432014-05-13 Marek Polacek <polacek@redhat.com>
944
945 PR c/61162
946 * c-typeck.c (convert_for_assignment): Pass location to
947 WARN_FOR_ASSIGNMENT instead of input_location.
948
c9e51d25 9492014-05-10 Marek Polacek <polacek@redhat.com>
950
951 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
952 maybe_warn_string_init.
953 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
954 maybe_warn_string_init.
955 * c-tree.h (maybe_warn_string_init): Update declaration.
956 * c-typeck.c (maybe_warn_string_init): Add location parameter.
957 Call pedwarn_init with loc instead of with input_location.
958 (digest_init): Pass init_loc to maybe_warn_string_init.
959 (pop_init_level): Call pedwarn_init with loc instead of with
960 input_location.
961 (set_init_index): Likewise.
962 (process_init_element): Likewise.
963
53de1631 9642014-05-09 Marek Polacek <polacek@redhat.com>
965
966 PR c/61096
967 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
968 (c_parser_initelt): Pass location to set_init_label. Pass array index
969 location to set_init_index.
970 * c-tree.h (push_init_level): Update declaration.
971 (pop_init_level): Likewise.
972 (set_init_index): Likewise.
973 (set_init_label): Likewise.
974 * c-typeck.c (error_init): Add location parameter. Call error_at
975 instead of error.
976 (digest_init): Pass init_loc to error_init.
977 (really_start_incremental_init):
978 (push_init_level): Add location parameter. Pass loc to pop_init_level
979 and error_init.
980 (pop_init_level): Likewise.
981 (set_designator): Add location parameter. Pass loc to pop_init_level,
982 push_init_level, and error_init.
983 (set_init_index): Add location parameter. Pass loc to error_init and
984 set_designator.
985 (set_init_label): Likewise.
986 (output_init_element): Pass loc to error_init.
987 (process_init_element): Pass loc to error_init, pop_init_level,
988 pedwarn_init, and push_init_level.
989
3e5a8b00 9902014-05-09 Marek Polacek <polacek@redhat.com>
991
992 PR c/50459
993 * c-parser.c (c_parser_attributes): Parse the arguments as an
994 expression-list if the attribute takes identifier.
995
c2c4ae8d 9962014-05-08 Marek Polacek <polacek@redhat.com>
997
998 PR c/61053
999 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1000 TYPE_ALIGN_UNIT.
1001
2026249a 10022014-05-08 Marek Polacek <polacek@redhat.com>
1003
1004 PR c/61077
1005 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1006 of main.
1007
960d5a55 10082014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1009 Mike Stump <mikestump@comcast.net>
1010 Richard Sandiford <rdsandiford@googlemail.com>
1011
1012 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1013 (finish_enum): Use wide-int interfaces.
1014 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1015 * c-typeck.c (build_c_cast): Likewise.
1016 (set_nonincremental_init_from_string): Likewise.
1017 (c_tree_equal): Likewise.
1018
e0e14cbd 10192014-05-02 Marek Polacek <polacek@redhat.com>
1020
1021 PR c/25801
1022 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1023 Return size_one_node when the type is not complete.
1024 (pointer_diff): Remove comment.
1025 (build_unary_op): Improve error messages.
1026
27ff10cb 10272014-05-02 Marek Polacek <polacek@redhat.com>
1028
1029 * c-typeck.c (c_finish_return): Separate warning_at calls.
1030
68410ce9 10312014-05-02 Marek Polacek <polacek@redhat.com>
1032
1033 * c-tree.h (error_init): Remove declaration.
1034 (pedwarn_init): Likewise.
1035 * c-typeck.c (error_init): Make static and move above.
1036 (pedwarn_init): Likewise.
1037 (warning_init): Move above.
1038 (maybe_warn_string_init): Likewise.
1039
e8e27117 10402014-05-01 Jeff Law <law@redhat.com>
1041
1042 Revert:
1043
1044 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1045 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1046 avoid goto.
1047
971df357 10482014-05-02 Marek Polacek <polacek@redhat.com>
1049
1050 PR c/60784
1051 * c-typeck.c (push_init_level): Set constructor_designated to
1052 p->designated for structures.
1053
de548fe5 10542014-05-01 Marek Polacek <polacek@redhat.com>
1055
1056 PR c/60915
1057 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1058 function-definition has an attribute after the declarator.
1059
053a0ded 10602014-05-01 Marek Polacek <polacek@redhat.com>
1061
1062 PR c/60257
1063 * c-typeck.c (warning_init): Add location_t parameter. Call
1064 warning_at instead of warning.
1065 (push_init_level): Pass input_location to warning_init.
1066 (add_pending_init): Add location_t parameter. Pass loc to
1067 warning_init.
1068 (set_nonincremental_init): Pass input_location to add_pending_init.
1069 (set_nonincremental_init_from_string): Likewise.
1070 (output_init_element): Pass loc to warning_init and to
1071 add_pending_init.
1072
694296f2 10732014-05-01 Marek Polacek <polacek@redhat.com>
1074
1075 PR c/43395
1076 * c-typeck.c (c_finish_return): Distinguish between label and variable
1077 when warning about returning local address.
1078
86bbd7f9 10792014-05-01 Marek Polacek <polacek@redhat.com>
1080
1081 PR c/29467
1082 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1083 in C89 mode.
1084
e4ab2ef3 10852014-05-01 Marek Polacek <polacek@redhat.com>
1086
1087 PR c/43245
1088 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1089 instead of 0 to WARN_FOR_QUALIFIERS.
1090
ca3999cb 10912014-05-01 Marek Polacek <polacek@redhat.com>
1092
1093 PR c/56989
1094 * c-typeck.c (default_conversion): Use better location for
1095 error call.
1096
52cc0072 10972014-04-30 Marek Polacek <polacek@redhat.com>
1098
1099 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1100 also when SANITIZE_FLOAT_DIVIDE is on.
1101
af379dd3 11022014-04-30 Marek Polacek <polacek@redhat.com>
1103
1104 PR c/60139
1105 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1106 and pedwarn_init. Use loc insted of input_location.
1107
b069c2a0 11082014-04-30 Marek Polacek <polacek@redhat.com>
1109
1110 PR c/60351
1111 * c-typeck.c (build_binary_op): Use location when warning about
1112 shift count.
1113
4a026b48 11142014-04-25 Marek Polacek <polacek@redhat.com>
1115
1116 PR c/18079
1117 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1118 always_inline/noinline and hot/cold attributes.
1119
adc93f31 11202014-04-25 Marek Polacek <polacek@redhat.com>
1121
1122 PR c/60114
1123 * c-parser.c (c_parser_initelt): Pass input_location to
1124 process_init_element.
1125 (c_parser_initval): Pass loc to process_init_element.
1126 * c-tree.h (process_init_element): Adjust declaration.
1127 * c-typeck.c (push_init_level): Pass input_location to
1128 process_init_element.
1129 (pop_init_level): Likewise.
1130 (set_designator): Likewise.
1131 (output_init_element): Add location_t parameter. Pass loc to
1132 digest_init.
1133 (output_pending_init_elements): Pass input_location to
1134 output_init_element.
1135 (process_init_element): Add location_t parameter. Pass loc to
1136 output_init_element.
1137
e1029911 11382014-04-24 Jakub Jelinek <jakub@redhat.com>
1139
1140 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1141 atomic-clause, allow comma in between atomic-clause and
1142 seq_cst.
1143
9f0a7bc6 11442014-04-22 Jakub Jelinek <jakub@redhat.com>
1145
1146 PR c/59073
1147 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1148 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1149
094da06d 11502014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1151
1152 PR middle-end/60469
1153 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1154 create_tmp_var instead build_decl for creating temps.
1155 (build_array_notation_expr): Likewise.
1156 (fix_conditional_array_notations_1): Likewise.
1157 (fix_array_notation_expr): Likewise.
1158 (fix_array_notation_call_expr): Likewise.
1159
5a672e62 11602014-03-28 Jakub Jelinek <jakub@redhat.com>
1161
1162 PR c++/60689
1163 * c-tree.h (c_build_function_call_vec): New prototype.
1164 * c-typeck.c (build_function_call_vec): Don't call
1165 resolve_overloaded_builtin here.
1166 (c_build_function_call_vec): New wrapper function around
1167 build_function_call_vec. Call resolve_overloaded_builtin here.
1168 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1169 Call c_build_function_call_vec instead of build_function_call_vec.
1170 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1171 * c-decl.c (finish_decl): Likewise.
1172
f40f5e0e 11732014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1174
1175 PR c/55383
1176 * c-typeck.c: Use correct format string in cast-qual warning
1177
9ec099a3 11782014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1179
1180 * c-decl.c (c_decl_attributes): Use
1181 lang_hooks.types.omp_mappable_type.
1182 * c-typeck.c (c_finish_omp_clauses): Likewise.
1183
3bfdc94f 11842014-03-06 Marek Polacek <polacek@redhat.com>
1185
1186 PR c/60197
1187 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1188 of checking tree code.
1189
8f1128f8 11902014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1191
1192 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1193 (c_parser_parameter_declaration): Likewise.
1194
977b1853 11952014-02-19 Marek Polacek <polacek@redhat.com>
1196
1197 PR c/60195
1198 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1199 Call mark_exp_read on exp.value.
1200 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1201 TREE_ADDRESSABLE on old instead of val.
1202 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1203
825cd6ef 12042014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1205
1206 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1207 C_EXPR_APPEND by vec_safe_push.
1208 * c-tree.h (C_EXPR_APPEND): Remove.
1209
ec761d5a 12102014-01-31 Marek Polacek <polacek@redhat.com>
1211
1212 PR c/59963
1213 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1214 build_function_call_vec.
1215 (build_function_call): Likewise.
1216 (build_atomic_assign): Likewise.
1217 (build_function_call_vec): Add arg_loc parameter. Use it.
1218 (convert_arguments): Likewise.
1219 (convert_for_assignment): Rename rhs_loc to expr_loc.
1220 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1221 (c_parser_objc_keywordexpr): Likewise.
1222 (c_parser_postfix_expression_after_primary): Call
1223 build_function_call_vec with expr_loc rather than op_loc.
1224 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1225 build_function_call_vec.
1226 (c_parser_expr_list): Add locations parameter. Fill it with locations
1227 of function arguments.
1228 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1229
22a75734 12302014-01-30 Marek Polacek <polacek@redhat.com>
1231
1232 PR c/59940
1233 * c-typeck.c (build_function_call_vec): Use loc parameter.
1234 (convert_arguments): Add location parameter. Use it.
1235 (ep_convert_and_check): Likewise.
1236 (build_atomic_assign): Adjust convert_for_assignment call.
1237 (build_modify_expr): Likewise.
1238 (digest_init): Likewise.
1239 (c_finish_return): Likewise.
1240 (build_conditional_expr): Adjust ep_convert_and_check calls.
1241 (convert_for_assignment): Add rhs_loc parameter. Use it.
1242 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1243 calls.
1244
29f580ac 12452014-01-30 Richard Biener <rguenther@suse.de>
1246
1247 PR c/59905
1248 * c-typeck.c (build_function_call_vec): Do not replace calls
1249 to a function via an incompatible type with a runtime abort.
1250
a89e6c15 12512014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1252
1253 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1254 flag_enable_cilkplus with flag_cilkplus.
1255 (c_parser_direct_declarator_inner): Likewise.
1256 (c_parser_attribute_any_word): Likewise.
1257 (c_parser_attributes): Likewise.
1258 (c_parser_compound_statement): Likewise.
1259 (c_parser_statement_after_labels): Likewise.
1260 (c_parser_if_statement): Likewise.
1261 (c_parser_switch_statement): Likewise.
1262 (c_parser_do_statement): Likewise.
1263 (c_parser_for_statement): Likewise.
1264 (c_parser_unary_expression): Likewise.
1265 (c_parser_postfix_expression): Likewise.
1266 (c_parser_postfix_expression_after_primary): Likewise.
1267 (c_parser_postfix_expression_after_primary): Likewise.
1268 (c_parser_omp_clause_name): Likewise.
1269 (c_finish_omp_declare_simd): Likewise.
1270 (c_parser_cilk_verify_simd): Likewise.
1271 * c-typeck.c (build_array_ref): Likewise.
1272 (build_function_call_vec): Likewise.
1273 (convert_arguments): Likewise.
1274 (build_compound_expr): Likewise.
1275 (c_finish_return): Likewise.
1276 (c_finish_if_stmt): Likewise.
1277 (c_finish_loop): Likewise.
1278 (build_binary_op): Likewise.
1279
2623625f 12802014-01-23 Marek Polacek <polacek@redhat.com>
1281
1282 PR c/59846
1283 * c-typeck.c (parser_build_binary_op): Use location instead of
1284 input_location.
1285 (build_binary_op): Pass location to shorten_compare.
1286
46da3601 12872014-01-23 Marek Polacek <polacek@redhat.com>
1288
1289 PR c/58346
1290 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1291 an empty aggregate.
1292
9a9db3c1 12932014-01-23 Marek Polacek <polacek@redhat.com>
1294
1295 PR c/59871
1296 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1297 of a comma expression.
1298 (emit_side_effect_warnings): Likewise.
1299
69c9b607 13002014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1301
1302 PR c/59825
1303 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1304 function to use walk_tree and moved a lot of its functionality to
1305 expand_array_notations.
1306 (expand_array_notations): New function.
1307
7e005ab5 13082014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1309
1310 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1311 attribute an attribute without value.
1312
d6779b5f 13132014-01-23 Jakub Jelinek <jakub@redhat.com>
1314
1315 PR middle-end/58809
1316 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1317 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1318
ec431042 13192014-01-22 Marek Polacek <polacek@redhat.com>
1320
1321 PR c/59891
1322 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1323 of remove_c_maybe_const_expr on op1 and op2.
1324
1248c663 13252014-01-15 Jakub Jelinek <jakub@redhat.com>
1326
1327 PR c/58943
1328 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1329 effects, preevaluate rhs using SAVE_EXPR first.
1330
0bc789fc 13312014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1332
1333 PR c++/59631
1334 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1335 statements with if-elseif statements.
1336
6685d11c 13372014-01-06 Marek Polacek <polacek@redhat.com>
1338
1339 PR c/57773
1340 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1341 defined bit-field types only in ISO C.
1342
3aea1f79 13432014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1344
1345 Update copyright years
1346
e4f22041 13472014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1348
1349 * c-array-notation.c: Use the standard form for the copyright notice.
1350
74acc703 13512013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1352
1353 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1354 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1355 field in parser is not empty. If not-empty, call the function
1356 c_parser_finish_omp_declare_simd.
1357 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1358 between SIMD-enabled functions and #pragma simd. Added new parameter.
1359 (c_parser_cilk_all_clauses): Modified the usage of the function
1360 c_parser_cilk_clause_vectorlength as mentioned above.
1361 (c_parser_cilk_simd_fn_vector_attrs): New function.
1362 (c_finish_cilk_simd_fn_tokens): Likewise.
1363 (is_cilkplus_vector_p): Likewise.
1364 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1365 "nomask," and "mask" strings in clause name.
1366 (c_parser_omp_all_clauses): Added 3 new case statements:
1367 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1368 PRAGMA_CILK_CLAUSE_NOMASK.
1369 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1370 check for vector attribute and if so call the function
1371 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1372 called the function c_finish_cilk_simd_fn_tokens.
1373 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1374 parser field is non-empty. If so, parse them as you would parse
1375 the omp declare simd pragma.
1376 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1377 Added a check when step is a parameter and flag it as error.
1378 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1379 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1380 pragma_omp_clause.
1381
395dc01c 13822013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1383
1384 * c-parser.c (c_parser_omp_parallel): Fix description.
1385
433e804e 13862013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1387
1388 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1389 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1390 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1391 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1392
a179a7dc 13932013-12-04 Joseph Myers <joseph@codesourcery.com>
1394
1395 PR c/52023
1396 * c-parser.c (c_parser_alignas_specifier): Use
1397 c_sizeof_or_alignof_type instead of c_alignof.
1398 (c_parser_alignof_expression): Likewise, with min_alignof
1399 parameter depending on alignof spelling used.
1400
bdf1e3c7 14012013-12-04 Marek Polacek <polacek@redhat.com>
1402
1403 PR c/54113
1404 * c-decl.c (start_function): Don't warn for missing prototype for
1405 inline functions.
1406
05e8f674 14072013-12-03 Marek Polacek <polacek@redhat.com>
1408
1409 PR c/59351
1410 * c-decl.c (build_compound_literal): Allow compound literals with
1411 empty initial value.
1412
39f74d66 14132013-12-02 Joseph Myers <joseph@codesourcery.com>
1414
1415 PR c/58235
1416 * c-typeck.c (build_modify_expr): Diagnose assignment to
1417 expression with array type.
1418
f221adca 14192013-11-29 Joseph Myers <joseph@codesourcery.com>
1420
1421 PR c/42262
1422 * c-typeck.c (process_init_element): Do not treat a string as
1423 initializing a whole array when used with a designator for an
1424 individual element.
1425
75bce827 14262013-11-29 Joseph Myers <joseph@codesourcery.com>
1427
1428 PR c/57574
1429 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1430 an inline function following a static declaration.
1431
dc133326 14322013-11-28 Jakub Jelinek <jakub@redhat.com>
1433
1434 PR c/59310
1435 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1436 to p_name before calling c_parser_omp_teams instead of after.
1437 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1438 argument. Remove unused p_name variable.
1439
d09768a4 14402013-11-27 Aldy Hernandez <aldyh@redhat.com>
1441 Jakub Jelinek <jakub@redhat.com>
1442
1443 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1444 external_scope is NULL.
1445
73fd9cbe 14462013-11-27 Tom de Vries <tom@codesourcery.com>
1447 Marc Glisse <marc.glisse@inria.fr>
1448
1449 PR c++/59032
1450 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1451
bc61cadb 14522013-11-22 Andrew MacLeod <amacleod@redhat.com>
1453
1454 * c-typeck.c: Add required include files from gimple.h.
1455
3df42822 14562013-11-22 David Malcolm <dmalcolm@redhat.com>
1457
1458 * c-decl.c (define_label, shadow_tag_warned)
1459 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1460 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1461 (declspecs_add_type): Remove use of in_system_header macro.
1462 * c-parser.c (c_parser_unary_expression): Likewise.
1463 * c-typeck.c (store_init_value, process_init_element)
1464 (c_start_case): Likewise.
1465
1466 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1467 macro.
1468
1469 * c-parser.c (c_parser_set_source_position_from_token): Remove
1470 reference to in_system_header from comment.
1471
08f817b3 14722013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1473
1474 * c-decl.c (grokdeclarator): Update comment to refer to
1475 tree_to_[su]hwi rather than tree_low_cst.
1476
6a0712d4 14772013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1478
1479 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1480 tree_to_uhwi throughout.
1481
fcb97e84 14822013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1483
1484 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1485 throughout.
1486
35ec552a 14872013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1488
1489 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1490 throughout.
1491
f2697631 14922013-11-15 Aldy Hernandez <aldyh@redhat.com>
1493
1494 * c-parser.c (c_parser_cilk_simd): New.
1495 (c_parser_cilk_verify_simd): New.
1496 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1497 (c_parser_omp_for_loop): Add case for NE_EXPR.
1498 Set c_break_label for CILK_SIMD.
1499 (c_parser_cilk_clause_vectorlength): New.
1500 (c_parser_cilk_clause_linear): New.
1501 (c_parser_cilk_clause_name): New.
1502 (c_parser_cilk_all_clauses): New.
1503 * c-typeck.c (build_unary_op): Pass location argument to
1504 readonly_error.
1505 (build_modify_expr): Same.
1506 (build_asm_expr): Same.
1507 (c_finish_bc_stmt): Error on break/continue in loops.
1508
e795d6e1 15092013-11-14 Andrew MacLeod <amacleod@redhat.com>
1510
1511 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1512
9ed99284 15132013-11-14 Diego Novillo <dnovillo@google.com>
1514
1515 * c-decl.c: Include print-tree.h.
1516 Include stor-layout.h.
1517 Include varasm.h.
1518 Include attribs.h.
1519 Include stringpool.h.
1520 * c-lang.c: Include fold-const.h.
1521 * c-parser.c: Include stringpool.h.
1522 Include attribs.h.
1523 Include stor-layout.h.
1524 Include varasm.h.
1525 Include trans-mem.h.
1526 * c-typeck.c: Include stor-layout.h.
1527 Include trans-mem.h.
1528 Include varasm.h.
1529 Include stmt.h.
1530
4fba5eb9 15312013-11-13 Joseph Myers <joseph@codesourcery.com>
1532
1533 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1534 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1535 __auto_type.
1536 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1537 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1538 RID_AUTO_TYPE.
1539 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1540 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1541 (c_parser_declarator, c_parser_direct_declarator_inner)
1542 (c_parser_parameter_declaration, c_parser_type_name): All callers
1543 changed.
1544 (c_parser_declaration_or_fndef): Handle declarations with type
1545 determined from the initializer.
1546
a8783bee 15472013-11-12 Andrew MacLeod <amacleod@redhat.com>
1548
e795d6e1 1549 * c-typeck.c: Include gimplify.h.
a8783bee 1550
d184e0c0 15512013-11-12 Joseph Myers <joseph@codesourcery.com>
1552
1553 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1554 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1555 comment.
1556 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1557 or _Thread_local as appropriate in diagnostics.
1558 (build_null_declspecs): Initialize ret->thread_gnu_p.
1559 (declspecs_add_scspec): Handle either __thread or _Thread_local
1560 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1561 pedantic. Do not disallow _Thread_local extern and _Thread_local
1562 static.
1563
b560fabd 15642013-11-07 Joseph Myers <joseph@codesourcery.com>
1565 Andrew MacLeod <amacleod@redhat.com>
1566
1567 * c-aux-info.c (gen_type): Handle atomic qualifier.
1568 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1569 qualifiers when compating types.
1570 (shadow_tag_warned): Handle atomic_p in declspecs.
1571 (quals_from_declspecs): Likewise.
1572 (start_decl): Use c_type_promotes_to when promoting argument
1573 types.
1574 (grokdeclarator): Handle _Atomic.
1575 (get_parm_info): Diagnose any qualifier on "void" as only
1576 parameter.
1577 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1578 comparing types. Use c_type_promotes_to when promoting argument
1579 types.
1580 (finish_function): Use c_type_promotes_to when promoting argument
1581 types.
1582 (build_null_declspecs): Handle atomic_p in declspecs.
1583 (declspecs_add_qual): Handle RID_ATOMIC.
1584 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1585 (c_token_starts_declspecs): Handle RID_ATOMIC.
1586 (c_parser_declspecs): Handle atomic type specifiers and
1587 qualifiers.
1588 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1589 from types of expressions with atomic type.
1590 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1591 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1592 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1593 (c_parser_statement_after_labels, c_parser_switch_statement)
1594 (c_parser_for_statement, c_parser_expr_no_commas)
1595 (c_parser_conditional_expression, c_parser_binary_expression)
1596 (c_parser_cast_expression, c_parser_unary_expression)
1597 (c_parser_postfix_expression)
1598 (c_parser_postfix_expression_after_primary, c_parser_expression):
1599 Use convert_lvalue_to_rvalue.
1600 (c_parser_expression_conv, c_parser_expr_list): Document
1601 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1602 (c_parser_objc_synchronized_statement): Use
1603 convert_lvalue_to_rvalue.
1604 (c_parser_objc_selector): Handle RID_ATOMIC.
1605 (c_parser_objc_receiver, c_parser_array_notation): Use
1606 convert_lvalue_to_rvalue.
1607 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1608 _Atomic (type-name).
1609 (struct c_declspecs): Add atomic_p field.
1610 (convert_lvalue_to_rvalue): Declare.
1611 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1612 corresponding atomic types.
1613 (qualify_type): Don't add _Atomic qualifiers from second argument.
1614 (comp_target_types): Do not allow _Atomic mismatches.
1615 (type_lists_compatible_p): Do not remove atomic qualifiers when
1616 comparing types.
1617 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1618 (build_atomic_assign): New functions.
1619 (build_unary_op): Use build_atomic_assign for atomic increment and
1620 decrement.
1621 (build_conditional_expr): Do not treat _Atomic void as a qualified
1622 version of void.
1623 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1624 (find_anonymous_field_with_type, convert_to_anonymous_field)
1625 (convert_for_assignment): Do not remove atomic qualifiers when
1626 comparing types.
1627 (digest_init): Do not accept initialization of arrays of atomic
1628 elements by string constants.
1629 (build_asm_expr): Use convert_lvalue_to_rvalue.
1630 (build_binary_op): Do not treat _Atomic void as a qualified
1631 version of void.
1632
8b023e7c 16332013-11-06 DJ Delorie <dj@redhat.com>
1634
1635 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1636 both explicit and builtin, print the location of the explicit one.
1637
c630ef93 16382013-11-05 Tobias Burnus <burnus@net-b.de>
1639
1640 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1641 c_parser_omp_distribute, c_parser_omp_teams,
1642 c_parser_omp_target, c_parser_omp_declare): Handle
1643 -fopenmp-simd.
1644
2c4c3477 16452013-11-03 Marek Polacek <polacek@redhat.com>
1646
1647 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1648
df205251 16492013-11-01 Jakub Jelinek <jakub@redhat.com>
1650
1651 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1652 check_dup_generic at the end, unless remove is true.
1653 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1654 remove = true;.
1655 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1656
23871d0c 16572013-10-31 Jakub Jelinek <jakub@redhat.com>
1658
1659 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1660 with decl that is not pointer nor array.
1661
d037099f 16622013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1663
1664 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1665 a spawning function is found.
1666 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1667 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1668 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1669 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1670 case.
1671 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1672 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1673 expr.
1674 (c_finish_return): Added a check to reject _Cilk_spawn in return
1675 expression.
1676 (build_cilk_spawn): New function.
1677 (build_cilk_sync): Likewise.
1678 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1679
4c90c04c 16802013-10-27 Tobias Burnus <burnus@net-b.de>
1681
1682 PR other/33426
1683 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1684 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1685 (c_parser_statement_after_labels): Update calls.
1686
48a972c8 16872013-10-24 Tobias Burnus <burnus@net-b.de>
4644b593 1688
1689 PR other/33426
1690 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1691 Handle PRAGMA_IVDEP.
1692 (c_parser_statement_after_labels): Update call.
1693
12f86df0 16942013-10-24 Marek Polacek <polacek@redhat.com>
1695
1696 * c-parser.c (c_parser_struct_declaration): Add a comment.
1697 (c_parser_declarator): Don't allow _Alignas here.
1698
7740abd8 16992013-10-17 Andrew MacLeod <amacleod@redhat.com>
1700
1701 * c-parser.c: Include omp-low.h.
1702 * c-typeck.c: Likewise.
1703
43d03c23 17042013-10-17 Marek Polacek <polacek@redhat.com>
1705
1706 PR c/58267
1707 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1708 Document syntax of the array-declarator.
1709 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1710 are not permitted.
1711 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1712 (c_parser_struct_declaration): Likewise.
1713 (c_parser_declarator): Likewise.
1714 (c_parser_direct_declarator_inner): Likewise.
1715 (c_parser_parameter_declaration): Likewise.
1716 (c_parser_type_name): Likewise.
1717
bc7bff74 17182013-10-11 Jakub Jelinek <jakub@redhat.com>
1719
1720 * c-lang.h (current_omp_declare_target_attribute): New extern
1721 decl.
1722 * c-parser.c: Include c-lang.h.
1723 (struct c_parser): Change tokens to c_token *.
1724 Add tokens_buf field. Change tokens_avail type to unsigned int.
1725 (c_parser_consume_token): If parser->tokens isn't
1726 &parser->tokens_buf[0], increment parser->tokens.
1727 (c_parser_consume_pragma): Likewise.
1728 (enum pragma_context): Add pragma_struct and pragma_param.
1729 (c_parser_external_declaration): Adjust
1730 c_parser_declaration_or_fndef caller.
1731 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1732 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1733 Adjust recursive call.
1734 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1735 of pragma_external.
1736 (c_parser_parameter_declaration): Use pragma_param instead of
1737 pragma_external.
1738 (c_parser_compound_statement_nostart, c_parser_label,
1739 c_parser_for_statement): Adjust
1740 c_parser_declaration_or_fndef callers.
1741 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1742 it through to c_parser_conditional_expression.
1743 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1744 pass it through to c_parser_binary_expression. Adjust recursive
1745 call.
1746 (c_parser_binary_expression): Remove prec argument, add
1747 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1748 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1749 binop matches it, use build2 instead of parser_build_binary_op.
1750 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1751 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1752 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1753 Handle pragma_struct and pragma_param the same as pragma_external.
1754 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1755 (c_parser_omp_variable_list): Parse array sections for
1756 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1757 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1758 (c_parser_omp_clause_reduction): Handle user defined reductions.
1759 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1760 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1761 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1762 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1763 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1764 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1765 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1766 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1767 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1768 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1769 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1770 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1771 (c_parser_omp_for_loop): Add CODE argument, pass it through
1772 to c_finish_omp_for. Change last argument to cclauses,
1773 and adjust uses to grab parallel clauses from the array of all
1774 the split clauses. Adjust c_parser_binary_expression,
1775 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1776 (omp_split_clauses): New function.
1777 (c_parser_omp_simd): New function.
1778 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1779 Allow the function to be called also when parsing combined constructs,
1780 and call c_parser_omp_simd when parsing for simd.
1781 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1782 #pragma omp section, require exactly one structured-block instead of
1783 sequence of statements.
1784 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1785 Allow the function to be called also when parsing combined constructs.
1786 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1787 Allow the function to be called also when parsing combined
1788 constructs.
1789 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1790 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1791 c_parser_omp_teams, c_parser_omp_target_data,
1792 c_parser_omp_target_update, c_parser_omp_target,
1793 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1794 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1795 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1796 (c_parser_omp_construct): Add p_name and mask vars. Handle
1797 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1798 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1799 and c_parser_omp_sections callers.
1800 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1801 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1802 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1803 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1804 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1805 OMP_CLAUSE_DEPEND.
1806 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1807 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1808 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1809 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1810 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1811 * c-typeck.c: Include tree-inline.h.
1812 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1813 handle_omp_array_sections_1, handle_omp_array_sections,
1814 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1815 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1816 user defined reductions.
1817 (c_tree_equal): New function.
1818 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1819 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1820 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1821 c_check_omp_declare_reduction_r): New prototypes.
1822 * c-decl.c (current_omp_declare_target_attribute): New variable.
1823 (c_decl_attributes): New function.
1824 (start_decl, start_function): Use it instead of decl_attributes.
1825 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1826 c_omp_reduction_decl, c_omp_reduction_lookup,
1827 c_check_omp_declare_reduction_r): New functions.
1828
3ce7d1bd 18292013-09-25 Tom Tromey <tromey@redhat.com>
1830
1831 * Make-lang.in (c/gccspec.o): Remove.
1832 (CFLAGS-c/gccspec.o): New variable.
1833 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1834 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1835 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1836
96da1c1d 18372013-09-25 Tom Tromey <tromey@redhat.com>
1838
1839 * Make-lang.in (c/gccspec.o): Don't use subshell.
1840
1b309377 18412013-09-18 Marek Polacek <polacek@redhat.com>
1842
1843 PR sanitize/58443
1844 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1845 Remove unnecessary check.
1846
05f893e1 18472013-09-18 Marek Polacek <polacek@redhat.com>
1848
1849 PR sanitizer/58411
1850 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1851 no_sanitize_undefined attribute.
1852
bda0b9d2 18532013-09-13 Kai Tietz <ktietz@redhat.com>
1854
1855 PR target/57848
1856 * c-decl.c (c_builtin_function_ext_scope): Remove
1857 wrong assumption that it is never called on prexisting
1858 symbol.
1859
73437615 18602013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1861
1862 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1863
eaab24b9 18642013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1865
1866 * c-objc-common.c (c_tree_printer): Tidy.
1867
9e46467d 18682013-08-30 Marek Polacek <polacek@redhat.com>
1869
1870 * c-typeck.c (build_binary_op): Add division by zero and shift
1871 instrumentation.
1872
f8234178 18732013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
f9086116 1874 Joseph Myers <joseph@codesourcery.com>
f8234178 1875
c90a7d10 1876 PR c/35649
f8234178 1877 * c-typeck.c (c_common_type): Prefer double_type_node over
1878 other REAL_TYPE types with the same precision.
1879 (convert_arguments): Likewise.
1880
6f07f480 18812013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1882
1883 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1884 (c_initialize_diagnostics): Call a destructor for the early printer.
1885
eed6bc21 18862013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1887
1888 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1889 printer initialization.
1890
57717943 18912013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
eed6bc21 1892
57717943 1893 PR c/57490
1894 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1895 check for truth values.
1896 (expand_array_notation_exprs): Added truth values case. Removed an
1897 unwanted else. Added for-loop to walk through subtrees in default
1898 case.
1899
a94db6b0 19002013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1901
1902 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1903
e76163a9 19042013-07-23 Joseph Myers <joseph@codesourcery.com>
1905
1906 * c-parser.c (struct c_generic_association): Fix typo.
1907
7aa04c8d 19082013-07-23 Tom Tromey <tromey@redhat.com>
1909 Joseph Myers <joseph@codesourcery.com>
1910
1911 * c-parser.c (struct c_generic_association): New.
1912 (c_generic_association_d): New typedef.
1913 (c_parser_generic_selection): New function.
1914 (c_parser_postfix_expression): Handle RID_GENERIC.
1915
76bbe4ca 19162013-07-13 Jason Merrill <jason@redhat.com>
1917
1918 PR c++/57793
1919 * c-decl.c (finish_struct): Check for too-large class.
1920
21ebaa24 19212013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
f5298614 1922
1923 PR c/57821
1924 * c-typeck.c (set_init_index): When folding, check for index overflow.
1925
936c3081 19262013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1927
1928 * c-parser.c (c_parser_array_notation): Removed rejection of array
1929 notations in an array of function pointers.
1930
50acebe0 19312013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1932
1933 * c-array-notation.c (make_triplet_val_inv): New function.
1934 (create_cmp_incr): Likewise.
1935 (create_array_refs): Likewise.
1936 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1937 Also modularized common parts between functions and called the function.
1938 (build_array_notation_expr): Likewise.
1939 (fix_conditional_array_notations_1): Likewise.
1940 (fix_array_notation_expr): Likewise.
1941 (fix_array_notation_call_expr): Likewise.
1942
01e6cdb4 19432013-06-18 Marek Polacek <polacek@redhat.com>
1944
1945 PR c/57630
1946 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1947
6a3adac6 19482013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
1949
1950 * c-array-notation.c (build_array_notation_expr): Reject array notation
1951 mismatch between LHS and RHS even inside a call_expr. Also, removed
1952 a couple while statements that were dead code.
1953
62aab3f3 19542013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
1955
1956 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1957 excessive precision expressions in function parameters. Also removed
1958 couple unwanted while statements.
1959
bfc83720 19602013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1961
1962 * c-array-notation.c (expand_array_notation_exprs): Added
1963 ARRAY_NOTATION_REF case.
1964
09970d67 19652013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1966
1967 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1968 function to c-family/array-notation-common.c.
1969 (is_cilkplus_reduce_builtin): Likewise.
1970 (find_rank): Likewise.
1971 (extract_array_notation_exprs): Likewise.
1972 (replace_array_notations): Likewise.
1973 (find_inv_trees): Likewise.
1974 (replace_inv_trees): Likewise.
1975 (contains_array_notation_expr): Likewise.
1976 (find_correct_array_notation_type): Likewise.
1977 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1978 (struct inv_list): Moved this to c-family/array-notation-common.c.
1979 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1980
6e13bc01 19812013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
1982
1983 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1984 reduction functions outside the for-loop. Added a check if the fundecl
1985 is non-NULL. Finally, removed an unwanted if-statement, and made the
1986 body unconditional.
1987
cc92dddc 19882013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1989
1990 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1991 condition of the if-statement matches the rank of else-block and then-
1992 block when array notations are used.
1993 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1994 expression after the entire function body is parsed.
1995 (c_parser_expr_no_commas): Delayed creating array notation expressions
1996 to the end of function parsing.
1997 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1998 whole if-statement instead of just the condition.
1999 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2000
eddc63fd 20012013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2002
2003 PR c/57474
2004 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2005 array to NULL_TREE if they are unused. Also added a check for the
2006 field to be NULL before its fields are used in future.
2007
a2115a4a 20082013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2009
2010 PR bootstrap/57450
2011 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2012 (build_array_notation_expr): Likewise.
2013
3c6d4197 20142013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2015
2016 * c-typeck.c (build_array_ref): Added a check to see if array's
2017 index is greater than one. If true, then emit an error.
2018 (build_function_call_vec): Exclude error reporting and checking
2019 for builtin array-notation functions.
2020 (convert_arguments): Likewise.
2021 (c_finish_return): Added a check for array notations as a return
2022 expression. If true, then emit an error.
2023 (c_finish_loop): Added a check for array notations in a loop
2024 condition. If true then emit an error.
2025 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2026 (build_binary_op): Added a check for array notation expr inside
2027 op1 and op0. If present, we call another function to find correct
2028 type.
2029 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2030 * c-parser.c (c_parser_compound_statement): Check if array
2031 notation code is used in tree, if so, then transform them into
2032 appropriate C code.
2033 (c_parser_expr_no_commas): Check if array notation is used in LHS
2034 or RHS, if so, then build array notation expression instead of
2035 regular modify.
2036 (c_parser_postfix_expression_after_primary): Added a check for
2037 colon(s) after square braces, if so then handle it like an array
2038 notation. Also, break up array notations in unary op if found.
2039 (c_parser_direct_declarator_inner): Added a check for array
2040 notation.
2041 (c_parser_compound_statement): Added a check for array notation in
2042 a stmt. If one is present, then expand array notation expr.
2043 (c_parser_if_statement): Likewise.
2044 (c_parser_switch_statement): Added a check for array notations in
2045 a switch statement's condition. If true, then output an error.
2046 (c_parser_while_statement): Similarly, but for a while.
2047 (c_parser_do_statement): Similarly, but for a do-while.
2048 (c_parser_for_statement): Similarly, but for a for-loop.
2049 (c_parser_unary_expression): Check if array notation is used in a
2050 pre-increment or pre-decrement expression. If true, then expand
2051 them.
2052 (c_parser_array_notation): New function.
2053 * c-array-notation.c: New file.
2054 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2055
2c1c8a2c 20562013-05-23 Mike Stump <mikestump@comcast.net>
2057
2058 * c-typeck.c (convert_for_assignment): Handle references to memory
2059 spaces better.
2060
be5f9e46 20612013-05-16 Jason Merrill <jason@redhat.com>
2062
2063 * Make-lang.in (cc1$(exeext)): Use link mutex.
2064
9205a6cc 20652013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2066
2067 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2068 to simply use OPT_Wpointer_arith.
2069 (build_unary_op): Likewise.
2070
0b049e15 20712013-04-03 Jakub Jelinek <jakub@redhat.com>
2072
2073 PR c/19449
2074 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2075 argument. If set, or it temporarily for parsing of the first
2076 argument into force_folding_builtin_constant_p.
2077 (c_parser_postfix_expression): Adjust callers.
2078
8e966116 20792013-03-21 Richard Biener <rguenther@suse.de>
2080
2081 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2082 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2083
b862f263 20842013-02-12 Marek Polacek <polacek@redhat.com>
2085
2086 PR c/44938
2087 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2088 origtypes to NULL.
2089
54550ecb 20902013-01-24 Jakub Jelinek <jakub@redhat.com>
2091
2092 PR c/56078
2093 * c-typeck.c (set_nonincremental_init_from_string): If
2094 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2095 returned false.
2096 (process_init_element): Likewise.
2097
035b65e2 20982012-12-20 Jakub Jelinek <jakub@redhat.com>
2099
2100 PR c++/55619
2101 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2102 argument, don't call default_function_array_conversion
2103 nor c_fully_fold here.
2104 (c_parser_asm_statement): Adjust callers.
2105 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2106 and outputs here, and call default_function_array_conversion
2107 on inputs that don't need to be addressable.
2108
7cbb7f1a 21092012-12-18 Jakub Jelinek <jakub@redhat.com>
2110
2111 PR c/39464
2112 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2113 warning require that both c_common_unsigned_type as well as
2114 c_common_signed_type is the same for both mvl and mvr types.
2115
f1f41a6c 21162012-11-16 Diego Novillo <dnovillo@google.com>
2117
2118 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2119
2120 * c-common.c: Use new vec API in vec.h.
2121 * c-common.h: Likewise.
2122 * c-gimplify.c: Likewise.
2123 * c-pragma.c: Likewise.
2124 * c-pretty-print.c: Likewise.
2125 * c-pretty-print.h: Likewise.
2126 * c-semantics.c: Likewise.
2127 * c-decl.c: Likewise.
2128 * c-parser.c: Likewise.
2129 * c-tree.h: Likewise.
2130 * c-typeck.c: Likewise.
2131
8b447d3f 21322012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2133
2134 PR c++/54930
2135 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2136
08fc5390 21372012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2138
2139 PR c/53066
2140 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2141 shadows a function, unless the variable is a function or a
2142 pointer-to-function.
2143
57f872a2 21442012-10-12 Jakub Jelinek <jakub@redhat.com>
2145
2146 PR c/54381
2147 * c-parser.c (struct c_tree_loc_pair): Removed.
2148 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2149 add location_t * and tree * arguments, fill in array of 3
2150 sizeof_arg trees and corresponding locs.
2151 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2152 c_parser_expr_list callers.
2153 (c_parser_postfix_expression_after_primary): Likewise. Pass
2154 array of 3 sizeof_arg trees and locs (corresponding to first
2155 3 arguments) to sizeof_pointer_memaccess_warning.
2156
d1455aa3 21572012-10-09 Lawrence Crowl <crowl@google.com>
2158
2159 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2160 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2161 hash table.
2162
b0e7825e 21632012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2164
2165 PR c++/54194
2166 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2167 call.
2168
41ed701a 21692012-10-09 Marc Glisse <marc.glisse@inria.fr>
2170
2171 PR c++/54427
2172 * c-typeck.c: Include c-common.h.
2173 (enum stv_conv): Moved to c-common.h.
2174 (scalar_to_vector): Moved to c-common.c.
2175 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2176 * Make-lang.in: c-typeck.c depends on c-common.h.
2177
ef34afc1 21782012-10-04 Arnaud Charlet <charlet@adacore.com>
2179
2180 * c-decl.c (c_write_global_declarations): Fix handling of
2181 -fdump-ada-spec*.
2182
7bd765d4 21832012-09-30 Sharad Singhai <singhai@google.com>
2184
2185 * c-decl.c (c_write_global_declarations): Use a different method
2186 to determine if the dump has ben initialized.
2187
c4b1a13a 21882012-09-14 Joseph Myers <joseph@codesourcery.com>
2189
2190 PR c/54552
2191 * c-typeck.c (c_cast_expr): When casting to a type requiring
2192 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2193 c_fully_fold first.
2194
bb554051 21952012-09-14 Joseph Myers <joseph@codesourcery.com>
2196
2197 PR c/54103
2198 * c-typeck.c (build_unary_op): Pass original argument of
2199 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2200 any C_MAYBE_CONST_EXPR, if it has integer operands.
2201 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2202 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2203 to c_objc_common_truthvalue_conversion, then remove any
2204 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2205 c_objc_common_truthvalue_conversion not
2206 c_common_truthvalue_conversion.
2207 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2208 call note_integer_operands for arguments with integer operands
2209 that are not integer constants.
2210
c708c6ef 22112012-09-13 Jakub Jelinek <jakub@redhat.com>
2212
2213 PR c/54559
2214 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2215 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2216
cce20430 22172012-08-31 Jakub Jelinek <jakub@redhat.com>
2218
2219 PR c/54428
2220 * c-convert.c (convert): Don't call fold_convert_loc if
2221 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2222 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2223 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2224
a90d57ed 22252012-08-24 Jakub Jelinek <jakub@redhat.com>
2226
2227 PR c/54355
2228 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2229 for nested and empty_ok arguments in the call to
2230 c_parser_declaration_or_fndef.
2231
f003f5dc 22322012-08-17 Jakub Jelinek <jakub@redhat.com>
2233
2234 * c-tree.h (c_last_sizeof_arg): Declare.
2235 * c-parser.c (struct c_tree_loc_pair): New type.
2236 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2237 non-NULL.
2238 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2239 (c_parser_postfix_expression_after_primary): Likewise. Call
2240 sizeof_pointer_memaccess_warning if needed.
2241 (sizeof_ptr_memacc_comptypes): New function.
2242 * c-typeck.c (c_last_sizeof_arg): New global variable.
2243 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2244
a5656b73 22452012-07-24 Uros Bizjak <ubizjak@gmail.com>
2246
2247 * c-lang.h (lang_decl): Add variable_size GTY option.
2248
b9ed1410 22492012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2250
2251 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2252 * Make-lang.in: Fix dependencies.
2253
e53d55e7 22542012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2255
2256 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2257 and add language Makefile hooks.
2258 * config-lang.in: New file.
2259 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2260 add the required "normal" config-lang.in rules.
2261 * c-lang.h: Moved from gcc/ to here.
2262 * c-tree.h: Likewise.
2263 * c-objc-common.c: Likewise.
2264 * c-objc-common.h: Likewise.
2265 * c-typeck.c: Likewise.
2266 * c-convert.c: Likewise.
2267 * c-lang.c: Likewise.
2268 * c-aux-info.c: Likewise.
2269 * c-errors.c: Likewise.
2270 * gccspec.c: Likewise.
2271 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2272 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2273\f
d353bf18 2274Copyright (C) 2012-2015 Free Software Foundation, Inc.
e53d55e7 2275
2276Copying and distribution of this file, with or without modification,
2277are permitted in any medium without royalty provided the copyright
2278notice and this notice are preserved.